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.

MediumSystem Design
0 practiced
Compare hash join and sort-merge join for joining two large relations in batch processing. Explain algorithms, memory usage, behavior when one side is much smaller, spill-to-disk mechanics, sensitivity to data skew, and how you would choose an algorithm for a particular data size and cluster resource profile.
EasyTechnical
0 practiced
Implement two_sum(nums, target) in Python that returns indices of two numbers that add up to target. The array is unsorted and you should aim for O(n) time and O(n) space. Explain how you would adapt the approach if the numbers arrive as a large stream and you must answer many queries.
EasyTechnical
0 practiced
Given an unweighted graph represented as an adjacency list, implement a Python function shortest_path_bfs(graph, start, target) that returns the shortest path as a list of nodes or None when unreachable, using BFS. Explain how parent pointers are used to reconstruct the path and analyze time and space complexity.
HardTechnical
0 practiced
You must aggregate counts across a huge dataset that exhibits key skew where a small number of keys dominate frequency. Compare hash-based aggregation and sort-based aggregation and propose algorithmic mitigations for skew such as pre-aggregation, sampling, hot-key handling, and adaptive repartitioning. Discuss how spills to disk affect both strategies.
EasyTechnical
0 practiced
Implement a Python function merge_sorted_inplace(a, m, b, n) that merges two sorted integer arrays where array a has length m+n and contains its first m valid elements followed by space, and array b has n elements. Do the merge in place in a, using O(1) extra memory and O(m+n) time. Example: a = [1,3,5,0,0], m=3, b=[2,4], n=2 -> result a = [1,2,3,4,5]. Explain why working from the end avoids overwriting.

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.