Arrays and Linked Lists - Complexity Analysis - Competitive Exam Level

Download Q&A
Q. In a doubly linked list, what is the time complexity of inserting a new node after a given node?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. In which data structure is the 'Last In First Out' (LIFO) principle applied?
  • A. Queue
  • B. Array
  • C. Stack
  • D. Linked List
Q. What is the average time complexity of inserting an element into a hash table?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. What is the time complexity of deleting the last element from a dynamic array?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of traversing a binary tree with n nodes?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
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