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.

MediumTechnical
73 practiced
Implement a Disjoint Set Union (Union-Find) data structure in Python with path compression and union by rank. Provide methods find(x) and union(x,y) and analyze why operations are nearly O(1) using inverse Ackermann notation. Give a sample use case for clustering or deduplication in data pipelines.
MediumTechnical
64 practiced
Describe algorithms to find the top k heavy hitters in a fast data stream using limited memory. Compare Count-Min Sketch, Space-Saving (Misra-Gries), and exact heap approaches. Explain error bounds, memory vs accuracy tradeoffs and give pseudocode for Space-Saving or Misra-Gries.
MediumSystem Design
74 practiced
You need to merge k sorted files on disk into a single sorted stream when each file is too large to fit in memory and you have limited RAM. Describe a k-way merge algorithm including how to manage buffers, use a min-heap, minimize disk I/O and handle very large k that does not fit heap memory. Outline complexity and practical I/O tuning considerations.
MediumTechnical
87 practiced
Implement Kahn's algorithm to produce a topological ordering of a directed acyclic graph and detect cycles. Write code or pseudocode that returns a topological order list if possible or reports a cycle. Analyze time and space complexity and discuss applications such as job scheduling and dependency resolution in ETL pipelines.
HardTechnical
131 practiced
Design an algorithm or data structure to compute streaming quantiles (for example median or 90th percentile) with bounded memory. Describe Greenwald-Khanna and t-digest approaches, their error guarantees, mergeability, and practical parameter choices for 1% error on high throughput streams.

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.