Data Base Management System
Complete study material for DBMS, RDBMS, Data Base Management System, Relational Data Base Management System, Primary Key, Foreign Key, Data, Information to prepare for B.Sc-IT, M.Sc-IT, BCA, MCA, MCa Entrance
Questions
What is the time required to search an element in a linked list of length 'n'?
- O(log2 n)
- O(n)
- O(1)
- O(n2)
Consider a linked list of 'n' elements which is pointed by an external pointer. What is the time taken to delete the element, which is successor of the element pointed to by a given pointer?
- O(1)
- O(log2 n)
- O(n)
- O(n log2 n)
In what kind of storage structure for strings, can one easily insert, delete, concatenate and rearrange sub-strings?
- Fixed length storage structure
- Variable length storage with fixed maximum
- Linked list storage
- Array type storage
Consider a linked list of 'n' elements. What is the time taken to insert an element after pointed by some pointers?
- O(1)
- O(log2 n)
- O(n)
- O(n log2 n)
Which of the following statements is false?
- Every tree is a bipartite graph.
- A tree contains a cycle.
- A tree with 'n' nodes contains 'n-1' edges.
- A tree is a connected graph.
An undirected graph G with 'n' vertices and 'e' edges is represented by adjacency list. What is the time required to generate all the connected components?
- O(n)
- O(e)
- O(e + n)
- O(e2)
Pre-order is nothing but
- depth first order
- breadth first order
- topological order
- linear order
Which traversal technique lists the notes of a binary search tree in ascending order?
- Post order
- In order
- Pre order
- None of these
Consider an undirected graph G with 'n' vertices and 'e' edges. What is the time taken by Depth First Search (DFS), if the graph is represented by: (i) adjacency matrix, and (ii) adjacency list?
- O(n2), O(n)
- O(n2), O(e)
- O(e), O(n2)
- O(e + n), O(e)
Consider a sorted binary insertion tree. What must be done to produce a sorted array of numbers (for printing) from the sorted binary insertion tree?
- Pre oder traversal
- Post order traversal
- In order traversal
- Top-down traversal
The concatenation of two lists is to be performed in O (1) time. Which of the following implementations of a list should be used?
- Singly linked list
- Doubly linked list
- Circular doubly linked list
- Array implementation
Which of the following algorithms solves all pairs shortest path problem?
- Greedy
- Depth-First Search
- Dyanamic Programming
- Divide & Conquer
Which of the following algorithms solves the quick sort problem?
- Greedy
- Depth-First Search
- Dyanamic Programming
- Divide & Conquer
Which of the following algorithms solves the minimum weight spanning tree problem?
- Greedy
- Depth-first Search
- Dynamic Programming
- Divide & Conquer
Selection sort's worst case space complexity is
- O
- O(n)
- O (logn)
- None of these
Bubble sort's worst case space complexity is
- 0
- O(n)
- O(logn)
- None of these
A full binary tree with 'n' non-leaf nodes contains
- log2 n nodes
- n + 1 nodes
- 2 n nodes
- 2n + 1 nodes
Which of the following algorithms solves the connected components problem?
- Greedy
- Depth-First Search
- Dynamic Programming
- Divide & Conquer
Insertion sort's worst case space complexity is
- 0
- O(n)
- O(logn)
- None of these
Quick sort's worst case space complexity is
- 0
- O(n)
- O(logn)
- None of these
Insertion sort's average case space complexity is
- 0
- O(n)
- O(logn)
- None of these
Bubble sort's average case space complexity is
- 0
- O(n)
- O(logn)
- None of these
Merge sort's worst case space complexity is
- 0
- O(n)
- O(logn)
- None of these
Selection sort's average case space complexity is
- 0
- O(n)
- O(logn)
- None of these
A graph G with 'n' nodes is bipartite if it contains
- n edges
- a cycle of odd length
- no cycle of odd length
- n2 edges
A complete binary tree with the property that the value at each node is at least as large as the values at its children, is known as
- Binary search tree
- AVL tree
- Completely balanced tree
- Heap
A full binary tree with 'n' leaves contains
- n nodes
- log2 n nodes
- 2n-1 nodes
- 2n nodes
Merge sort's average case space complexity is
- 0
- O(n)
- O(logn)
- None of these
In which tree, for every node the heights of its left sub-tree and right sub-tree differ at least by one?
- Binary search tree
- AVL tree
- Complete tree
- Threaded binary tree
Quick sort's average case space complexity is
- 0
- O(n)
- O(logn)
- None of these