Patterns, not puzzles
DSA Interview Questions
The core patterns behind coding rounds: arrays, hashing, recursion, trees, graphs and dynamic programming, explained in interview language.
40 questions10 easy22 medium8 hard0/40 learned
01What is Big O notation and why does it matter?Easybig-o · complexity · analysis02What is the difference between time and space complexity?Easycomplexity · time · space03How do arrays and linked lists differ?Easyarrays · linked-lists · data-structures04What is the time complexity of a hash table?Easyhash-tables · complexity · maps05How do stacks and queues work?Easystack · queue · data-structures06What patterns help with string manipulation problems?Mediumstrings · frequency-map · patterns07How does the two-pointer technique work?Mediumtwo-pointers · arrays · strings08How does the sliding window technique work?Mediumsliding-window · substrings · arrays09What are prefix sums and when are they useful?Mediumprefix-sums · arrays · subarrays10How does binary search work?Mediumbinary-search · search · sorted-arrays11How do common sorting algorithms compare?Mediumsorting · complexity · stability12How does merge sort work?Mediummerge-sort · divide-and-conquer · sorting13How does quicksort work?Mediumquicksort · partitioning · sorting14What makes a recursive function correct?Easyrecursion · base-case · call-stack15How does backtracking work?Hardbacktracking · recursion · search16What is dynamic programming?Mediumdynamic-programming · optimization · state17What is the difference between memoization and tabulation?Mediummemoization · tabulation · dynamic-programming18How do you solve the knapsack problem?Hardknapsack · dynamic-programming · optimization19How do you solve the longest common subsequence problem?Hardlcs · dynamic-programming · strings20When should you use greedy instead of dynamic programming?Mediumgreedy · dynamic-programming · optimization21What are the binary tree traversal orders?Mediumbinary-tree · traversal · recursion22How does breadth-first search work?Mediumbfs · graphs · queue23How does depth-first search work?Mediumdfs · graphs · recursion24What is a binary search tree?Easybst · trees · search25How do you calculate tree height and check balance?Mediumtrees · height · balance26How do you find the lowest common ancestor of two nodes?Hardtrees · lca · recursion27How does a heap back a priority queue?Mediumheap · priority-queue · trees28What is a trie and when is it useful?Mediumtrie · strings · prefix-search29How do you represent a graph?Easygraphs · adjacency-list · adjacency-matrix30How does topological sort work?Mediumtopological-sort · dag · graphs31How does union-find work?Hardunion-find · disjoint-sets · graphs32How does Dijkstra's algorithm work?Harddijkstra · shortest-path · graphs33How do you find a minimum spanning tree?Hardmst · kruskal · prim34How do you detect a cycle in a graph?Mediumcycle-detection · graphs · dfs35What bit manipulation tricks are useful in interviews?Mediumbit-manipulation · xor · binary36How do you traverse a matrix?Mediummatrix · traversal · grid37How do you solve interval problems?Mediumintervals · sorting · greedy38How do you design an LRU cache?Hardlru-cache · design · hash-map39What are common coding interview mistakes?Easyinterviews · debugging · edge-cases40How do you approach a coding problem in an interview?Easyinterviews · problem-solving · communication
Reading is step one
Now say it out loud.
Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live DSA mock interview and get scored feedback on depth, clarity and confidence.