Searching & Sorting Essentials

Binary search, merge sort, and complexity fundamentals. Ideal for students and interview prep.

10

Questions

00

Attempts

00

Passed

00

Failed

00

Likes

21

Views

00

Shares

Searching & Sorting Essentials
QUESTION NO 01
Share
A hash table ideally provides average lookup time of?

Answer: O(1)
With a good hash function and load factor, average lookup is O(1).
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 02
Share
Which sorting algorithm has average time complexity O(n log n)?

Answer: Merge sort
Merge sort divides and merges in O(n log n) average and worst case.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 03
Share
In a binary tree, each node has at most how many children?

Answer: 2
By definition a binary tree node has 0, 1, or 2 children.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 04
Share
Dijkstra's algorithm finds?

Answer: Shortest paths from a source in a weighted graph
Dijkstra computes shortest paths from one source (non-negative weights).
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 05
Share
Space complexity of an in-place algorithm is typically?

Answer: O(1) extra space
In-place algorithms use constant (or very small) extra memory beyond the input.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 06
Share
A stack can be used to evaluate?

Answer: Postfix expressions
Operand stacks are classic for evaluating postfix (RPN) expressions.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 07
Share
BFS on a graph typically uses a?

Answer: Queue
Breadth-first search explores level by level using a queue.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 08
Share
Worst-case time for searching in an unsorted array is?

Answer: O(n)
Linear search may scan all n elements in the worst case.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 09
Share
A min-heap always keeps the smallest element at the?

Answer: Root
In a min-heap the minimum key is at the root.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 10
Share
Recursion uses which memory structure implicitly?

Answer: Call stack
Each recursive call pushes a frame onto the call stack.
302 Quizzes
2930 Questions
00 Likes

Published By

Shahzad Mahota

@shahzad-mahota

WAS THIS QUIZ HELPFUL?
Please help us improve by giving us your feedback.
WAS THIS QUIZ HELPFUL?
Quiz complete See your shareable result poster
View result