InterviewStack.io LogoInterviewStack.io

Fundamental Algorithms and Techniques Questions

Covers core algorithmic concepts and problem solving patterns commonly assessed in technical interviews. Topics include searching algorithms such as binary search; sorting algorithms such as merge sort and quick sort; graph traversal methods such as breadth first search and depth first search; recursion and divide and conquer techniques; greedy heuristics; and dynamic programming including memoization and tabulation. Also includes implementation patterns such as two pointers, sliding window, prefix sums, and divide and conquer composition, as well as practical considerations like in place versus out of place implementations, stability for sorting, recursion stack and memory usage, and amortized analysis. Candidates should be able to implement these algorithms correctly, explain correctness and trade offs, analyze time and space complexity using Big O notation for best case average case and worst case, select appropriate approaches given input constraints, combine patterns to solve composite problems, and optimize or refactor solutions while handling edge cases.

HardSystem Design
0 practiced
Design a parallel/distributed external merge sort to sort a dataset of 1TB stored across multiple nodes. Outline steps for chunking, local sort, shuffle/merge, handling stragglers, and fault tolerance. Discuss I/O bottlenecks, network usage, and how you'd integrate with a distributed ML pipeline (feature store bulk sorting).
MediumTechnical
0 practiced
Implement Union-Find (disjoint-set) with union by rank and path compression in Python. Explain amortized time complexity and an example application in ML (e.g., connecting similar items for blocking in deduplication or connected-component labeling).
HardTechnical
0 practiced
Design and implement an LRU cache with get(key) and put(key, value) in O(1) time in Python. Include thread-safety discussion for concurrent access in a model serving environment (e.g., using locks, lock-free structures, or per-shard caches). Explain memory and eviction trade-offs when caching preprocessed features or model outputs.
EasyTechnical
0 practiced
You receive a sorted list of feature IDs used in training (ints). Implement an in-place Python function that removes duplicates and returns the new length (like LeetCode's remove-duplicates). Explain time/space complexity and why in-place deduplication matters for memory-limited model training. Example: nums = [1,1,2] → return 2 and nums becomes [1,2,_].
HardTechnical
0 practiced
Explain median-of-medians selection algorithm that achieves worst-case O(n) time. Provide a high-level description and sketch of proof for linear time, and discuss practicality vs randomized Quickselect in ML systems that require strict upper bounds on latency.

Unlock Full Question Bank

Get access to hundreds of Fundamental Algorithms and Techniques interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.