Arrays and Linked Lists - Complexity Analysis - Problem Set

Download Q&A
Q. In a binary tree, what is the maximum number of nodes at level 'h'?
  • A. h
  • B. 2^h
  • C. 2^(h+1)-1
  • D. h^2
Q. In a queue, what is the time complexity of enqueue operation?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the worst-case time complexity of bubble sort?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(1)
Q. Which of the following operations has a time complexity of O(1) in a stack?
  • A. Push
  • B. Pop
  • C. Peek
  • D. All of the above
Q. Which of the following sorting algorithms has the worst-case time complexity of O(n^2)?
  • A. Merge Sort
  • B. Quick Sort
  • C. Bubble Sort
  • D. Heap Sort
Showing 1 to 5 of 5 (1 Pages)
Soulshift Feedback ×

On a scale of 0–10, how likely are you to recommend The Soulshift Academy?

Not likely Very likely