Computer Science & IT

Download Q&A
Q. What is the time complexity of inserting an element into a stack?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. What is the time complexity of inserting an element into an AVL tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of level-order traversal of a binary tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of linear search in an array?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of linear search in an unsorted array?
  • A. O(log n)
  • B. O(n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of merge sort?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(log n)
Q. What is the time complexity of merging two binary trees?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of merging two sorted arrays of sizes m and n?
  • A. O(m + n)
  • B. O(m * n)
  • C. O(log(m + n))
  • D. O(n)
Q. What is the time complexity of merging two sorted arrays?
  • A. O(n)
  • B. O(n log n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of merging two sorted binary trees?
  • A. O(n)
  • B. O(n log n)
  • C. O(log n)
  • D. O(1)
Q. What is the time complexity of merging two sorted linked lists?
  • A. O(n)
  • B. O(n log n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of performing a binary search on a sorted array?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of performing a breadth-first search (BFS) on a graph?
  • A. O(V)
  • B. O(E)
  • C. O(V + E)
  • D. O(V * E)
Q. What is the time complexity of performing a level-order traversal on a Red-Black Tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of popping an element from a queue implemented using a linked list?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of popping an element from a stack?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of post-order traversal of a binary tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of Prim's algorithm for finding the minimum spanning tree using an adjacency matrix?
  • A. O(V^2)
  • B. O(E log V)
  • C. O(V + E)
  • D. O(V^3)
Q. What is the time complexity of pushing an element onto a stack implemented using a linked list?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of pushing an element onto a stack?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of quicksort in the average case?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(log n)
Q. What is the time complexity of quicksort in the best case?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(log n)
Q. What is the time complexity of removing an element from a queue?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n log n)
Q. What is the time complexity of reversing a linked list?
  • A. O(1)
  • B. O(n)
  • C. O(log n)
  • D. O(n^2)
Q. What is the time complexity of reversing a queue using a stack?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(1)
Q. What is the time complexity of reversing a stack using another stack?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(1)
Q. What is the time complexity of reversing a stack using recursion?
  • A. O(n)
  • B. O(n log n)
  • C. O(n^2)
  • D. O(1)
Q. What is the time complexity of searching for a value in a balanced binary search tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of searching for a value in a binary search tree (BST) with n nodes?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Q. What is the time complexity of searching for a value in a Red-Black tree?
  • A. O(n)
  • B. O(log n)
  • C. O(n log n)
  • D. O(1)
Showing 1891 to 1920 of 3237 (108 Pages)
Soulshift Feedback ×

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

Not likely Very likely