InterviewStack.io LogoInterviewStack.io

Advanced Algorithms and Problem Solving Questions

Comprehensive assessment of advanced algorithmic reasoning, design, and optimization for hard and composite problems. Covers advanced dynamic programming techniques including state compression and bitmask dynamic programming, combinatorial generation and backtracking, recursion and divide and conquer strategies, greedy algorithms with correctness proofs, and advanced graph algorithms such as breadth first search, depth first search, shortest path algorithms including Dijkstra and Bellman Ford, minimum spanning tree, network flow, strongly connected components, and topological sort. Also includes advanced tree and string algorithms such as suffix arrays and advanced hashing, bit manipulation and low level optimizations, algorithmic reductions and heuristics, and complexity analysis including amortized reasoning. Candidates should recognize applicable patterns, combine multiple data structures in a single solution, transform brute force approaches into optimized solutions, prove correctness and derive time and space complexity bounds, handle edge cases and invariants, and articulate trade offs and incremental optimization strategies. At senior levels expect mentoring on algorithmic choices, designing for tight constraints, and explaining engineering implications of algorithm selection.

MediumTechnical
0 practiced
You have ETL tasks, each with a start time, end time, and weight. Explain why selecting tasks by earliest finish time is optimal for unweighted interval scheduling but fails for weighted intervals. Describe the correct DP solution for weighted interval scheduling (sort by finish time, DP with binary search for previous compatible job), and prove correctness of the DP recurrence.
HardTechnical
0 practiced
Design a streaming or semi-streaming algorithm to approximate connected components in a dynamic graph where edges arrive as a stream and memory is limited to O(n polylog n) (n = number of nodes). Discuss approaches like label propagation, union-find sketches, randomized contraction, and sparsification. Explain how to detect component merges/splits over time and provide basic error bounds for your method.
HardTechnical
0 practiced
Implement Dinic's maximum flow algorithm in Python or Java. Provide a correct implementation with BFS level graph construction and DFS blocking flow using the current-arc optimization. Analyze runtime complexity, and explain optimizations for unit-capacity bipartite matching. Then discuss how you would scale max-flow computations approximately across multiple machines when the network is too large for a single host.
HardTechnical
0 practiced
Design a distributed quantile estimation system for high-throughput telemetry using t-digest. Explain how to construct per-node t-digests, merge them with bounded error, choose compression parameters to achieve ≤0.5% error across 1000 nodes, and analyze memory, CPU, and merge-time trade-offs. Compare t-digest to GK and reservoir-sampling-based quantile estimators for this use case.
HardTechnical
0 practiced
Design an algorithm to find the longest substring that repeats at least k times in a corpus of 500GB logs. Explain how to use suffix array + LCP array or suffix automaton approaches, outline external-memory construction and query steps, discuss how to parallelize across machines, and detail time and IO trade-offs for each approach.

Unlock Full Question Bank

Get access to hundreds of Advanced Algorithms and Problem Solving interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.