Test 14 : Data Structures Trees,
Forests, Binary, Search, AVL, B, B+,
B* Trees Graphs Algorithms Sorting
(Bubble, Selection, Merge, Quick,
Heap) Searching (Linear, Binary)
Hashing Performance Analysis
Time, Space, Asymptotic Notation,
Recurrence Relations
akgurumurthy@gmail.com Switch account
* Indicates required question
Email *
Record akgurumurthy@gmail.com as the email to be included with my
response
What’s the height of a singleton tree (only root)? * 1 point
a) 1
b) 0
c) 2
d) Undefined
Which hashing technique resolves collisions using linked lists? * 1 point
a) Open Addressing
b) Chaining
c) Double Hashing
d) Linear Probing
In AVL tree, balance factor of any node should be: * 1 point
a) 0
b) 1
c) -1, 0, or 1
d) Any integer
The minimum height of an AVL tree with n nodes is? * 1 point
a) log(n)
b) n
c) 2log(n+1)
d) log(n+1)
Which sorting algorithm works best for nearly sorted data? * 1 point
a) Bubble Sort
b) Insertion Sort
c) Selection Sort
d) Quick Sort
Which of the following trees is defined for underlying sets with a * 1 point
maximum of 2 vertices?
a) Binary Tree
b) AVL Tree
c) Top Tree
d) B-Tree
Maximum number of nodes in a binary tree of height h? * 1 point
a) 2^h
b) 2^(h+1) - 1
c) h+1
d) h
Which searching algorithm does NOT require elements to be * 1 point
sorted?
a)Linear Search
b) Binary Search
c) Interpolation Search
d) Exponential Search
In selection sort, the number of swaps is: * 1 point
a) O(nlogn)
b) O(n)
c) O(1)
d) O(n^2)
What is the worst-case time complexity of Heap Sort? * 1 point
a) O(n)
b) O(nlogn)
c) O(n^2)
d) O(logn)
Which traversal technique is used to get the sorted sequence in * 1 point
a binary search tree?
a) Preorder
b) Inorder
c) Postorder
d) Level order
Which structure uses both array and linked list representation? * 1 point
a) Trees
b) Heaps
c) Tries
d) Graphs
Which data structure is ideal for priority scheduling? * 1 point
a) Stack
b) Queue
c) Heap
d) Linked List
Which sorting algorithm is fastest for small arrays? * 1 point
a) Quick Sort
b) Shell Sort
c) Insertion Sort
d) Heap Sort
Which sort uses partitioning? * 1 point
a) Selection Sort
b) Quick Sort
c) Heap Sort
d) Radix Sort
The decrease by variable factor approach is used in: * 1 point
a) Merge Sort
b) Quick Sort
c) Selection Sort
d) Insertion Sort
Which is true for red-black tree? * 1 point
a) All leaves are red
b) Every path from root to leaf has same number of black nodes
c) No two red nodes can be adjacent
d) Both b and c
Which sorting algorithm has the worst-case time complexity * 1 point
O(n^2)?
a) Merge Sort
b) Quick Sort
c) Heap Sort
d) Selection Sort
If a graph has n vertices, maximum edges in a complete * 1 point
undirected graph are:
a) n(n+1)/2
b) n^2
c) n(n-1)/2
d) n-1
Which of the following is not a property of a B-tree? * 1 point
a) All leaves are at the same level
b) It is balanced
c) Each node may have more than two children
d) Each node must be completely filled
What is the lower bound for comparisons in a comparison-based * 1 point
sort?
a) Ω(1)
b) Ω(n)
c) Ω(nlogn)
d) Ω(n^2)
The running time of searching in skip list is: * 1 point
a) O(n)
b) O(log n)
c) O(n log n)
d) O(1)
Which of the following algorithms is NOT stable? * 1 point
a) Bubble Sort
b) Merge Sort
c) Heap Sort
d) Insertion Sort
In a graph, what is an adjacency list? * 1 point
a) Matrix representation
b) Array of lists
c) List of vertices only
d) Stack
Average case complexity of binary search is: * 1 point
a) O(1)
b) O(log n)
c) O(n)
d) O(nlogn)
Which is not guaranteed in a binary search tree? * 1 point
a) O(1) search time
b) Balanced structure
c) All elements inserted
d) Inorder traversal sorted
Which hashing can handle large keys efficiently? * 1 point
a) Multiplicative
b) Division
c) Folding
d) Double Hashing
Time complexity of Merge Sort is? * 1 point
a) O(n^2)
b) O(n)
c) O(logn)
d) O(nlogn)
Which algorithm requires divide and conquer and is in-place? * 1 point
a) Merge Sort
b) Quick Sort
c) Heap Sort
d) Bubble Sort
What is the worst-case time complexity for searching in a Hash * 1 point
Table?
a) O(1)
b) O(n)
c) O(logn)
d) O(nlogn)
Which of the following is not a balanced binary tree? * 1 point
a)AVL Tree
b) Splay Tree
c) B-Tree
d) Red Black Tree
Which data structure is used to implement recursion? * 1 point
a) Queue
b) Array
c) Stack
d) Linked List
In a full binary tree with n internal nodes, number of external * 1 point
nodes is:
a) n
b) n+1
c) 2n
d) n-1
What’s the time complexity for searching in a perfectly balanced * 1 point
B-tree?
a) O(log n)
b) O(1)
c) O(n)
d) O(nlogn)
Performance of linear search in average case: * 1 point
a) O(1)
b) O(n)
c) O(log n)
d) O(nlogn)
In which structure is parenthesis matching efficiently solved? * 1 point
a) Queue
b) Stack
c) Graph
d) Heap
Breadth First Search is commonly used to: * 1 point
a) Find shortest path in an unweighted graph
b) Find minimum spanning tree
c) Detect cycles in directed graph
d) Traverse trees in depth-first order
Which recurrence is for quicksort? * 1 point
a) T(n) = 2T(n/2) + O(n)
b) T(n) = T(n-1) + O(n)
c) T(n) = T(n/4) + O(n)
d) T(n) = T(n) + O(1)
Which tree always remains balanced? * 1 point
a) Binary Search Tree
b) AVL Tree
c) Splay Tree
d) B+ Tree
Which is true for B+ tree compared to B-tree? * 1 point
a) Internal nodes store data
b) All records appear at leaf level
c) Non-leaf nodes contain records
d) Height is always less
Binary Search works only on: * 1 point
a) Unsorted Arrays
b) Sorted Arrays
c) Linked Lists
d) Stacks
When is hashing not effective? * 1 point
a) When hash function is perfect
b) When there are many collisions
c) When elements are sorted
d) When data is sparse
The best case time for bubble sort is: * 1 point
a) O(nlogn)
b) O(n^2)
c) O(1)
d) O(n)
What is a full binary tree? * 1 point
Each node has at least two children
b) Each node has exactly two children
c) Each node has either zero or two children
d) All nodes are filled
Which sorting algorithm requires no additional storage space? * 1 point
a) Merge Sort
b) Selection Sort
c) Insertion Sort
d) Radix Sort
What is the space complexity of Merge Sort? * 1 point
a) O(n)
b) O(log n)
c) O(1)
d) O(nlogn)
In hashing, the load factor is: * 1 point
a) Number of slots
b) n/m (number of keys/number of buckets)
c) Hash function value
d) Maximum bucket size
Which sorting algorithm is not recursive? * 1 point
a) Bubble Sort
b) Merge Sort
c) Quick Sort
d) Heap Sort
Which graph traversal can be implemented with a queue? * 1 point
a) BFS
b) DFS
c) Topological sort
d) Calculation tree
Which is not a property of AVL tree? * 1 point
a) Balanced
b) Height difference between left and right is at most 1
c) Nodes have arbitrary balance factor
d) Search requires O(log n) time
Submit Page 1 of 1 Clear form
This content is neither created nor endorsed by Google. - Contact form owner - Terms of Service -
Privacy Policy
Does this form look suspicious? Report
Forms