dsa Interview Questions

Beginner Level15 questions
Step-by-step logic to solve a problem.
Measure of execution time relative to input size.
Measure of memory usage during execution.
Array = fixed size/fast access; Linked List = dynamic size/fast insertion.
LIFO data structure (Last In First Out).
FIFO data structure (First In First Out).
Function calling itself with a base case.
O(log N) search for sorted arrays.
Basic swap-based sorting (O(N^2)).
Key-value mapping via hash function (O(1) average).
Hierarchical node-based structure.
Tree where each node has max 2 children.
Sequence of characters.
Undefined = not initialized; Null = explicitly empty.
Queue with element prioritization.
Intermediate Level15 questions
BFS = Queue/Level-order; DFS = Stack/Deep-dive.
Solving subproblems once and storing results.
Nodes with next AND previous pointers.
Using two indices/pointers to solve problems in O(N).
Fixed or variable size window sliding through data.
Ordered binary tree for efficient searching.
Preserving order for equal elements.
O(N log N) stable sorting via divide and conquer.
Fast pivot-based sorting (Average O(N log N)).
Graph representation using arrays/lists of neighbors.
Tree-based structure for priority-based access.
Level-order graph traversal using a Queue.
Linked list where end points to start.
Average performance over a sequence of operations.
Different keys mapping to the same hash index.
Advanced Level10 questions
Shortest path algorithm for weighted graphs (O(E log V)).
Efficient string/prefix storage tree.
Self-balancing BST (Height-balanced).
Shortest path for graphs with negative weights.
Topological sort for DAGs.
Efficient prefix sum updates and queries (O(log N)).
All-pairs shortest path algorithm (O(V^3)).
Self-balancing BST using color-based rules.
Connecting all vertices with minimum total cost.
Efficient pattern matching (O(N+M)).