Arrays and Linked Lists - Complexity Analysis - Applications

Download Q&A
Q. In a binary search tree, what is the time complexity for searching for an element in the average case?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. In a binary tree, what is the maximum number of nodes at level k?
  • A. k
  • B. 2^k
  • C. 2^(k+1)
  • D. k^2
Q. In a singly linked list, what is the time complexity to insert an element at the beginning?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the average time complexity for searching an element in a sorted array using binary search?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of deleting a node from a linked list when you have a pointer to that node?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of inserting an element into a stack implemented using an array?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. Which of the following operations has a time complexity of O(n) in a linked list?
  • A. Accessing an element
  • B. Inserting at the end
  • C. Deleting a node
  • D. Searching for a value
Showing 1 to 7 of 7 (1 Pages)
Soulshift Feedback ×

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

Not likely Very likely