Data Structures & Algorithms

Arrays, linked lists, trees, graphs, sorting, and algorithmic complexity.

02

Quizzes

20

Questions

00

eBooks

01

Articles

00

Likes

124

Views

00

Shares

Data Structures & Algorithms

QUESTION NO 01
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 02
Share
Which traversal visits left subtree, root, then right subtree?

Answer: Inorder
Inorder is left → root → right.
302 Quizzes
2930 Questions
00 Likes
QUESTION NO 03
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 04
Share
A linked list stores elements as?

Answer: Nodes with data and pointers
Each node holds data and a reference/pointer to the next node.
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
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 07
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 08
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 09
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 10
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