InterviewStack.io LogoInterviewStack.io

Coding Fundamentals and Problem Solving Questions

Focuses on algorithmic thinking, data structures, and the process of solving coding problems under time constraints. Topics include core data structures such as arrays, linked lists, hash tables, trees, and graphs, common algorithms for searching and sorting, basics of dynamic programming and graph traversal, complexity analysis for time and space, and standard coding patterns. Emphasis on a disciplined problem solving approach: understanding the problem, identifying edge cases, proposing solutions with trade offs, implementing clean and readable code, and testing or reasoning about correctness and performance. Includes debugging strategies, writing maintainable code, and practicing medium difficulty interview style problems.

EasyTechnical
65 practiced
You have a list of floating-point batch losses observed during training. Implement a Python function max_average_window(arr, k) that returns the maximum average of any contiguous subarray of length k. Assume k > 0 and k <= len(arr). Aim for O(n) time and O(1) extra space. Example: arr=[0.4,0.5,0.1,0.2,0.9], k=3 -> 0.4.
HardTechnical
35 practiced
Implement Dijkstra's shortest paths in Python using an adjacency list and heapq to compute distances from a source to all nodes for non-negative weights. Discuss how to handle outdated entries in the heap, parent pointers for path reconstruction, and how to scale to very large sparse graphs.
EasyTechnical
34 practiced
In Python implement merge_sorted_inplace(A, m, B, n) that merges sorted list B into sorted list A which has length m + n with the first m elements valid and the remaining n positions reserved (e.g., zeros). This mirrors merging timestamped feature arrays. Do it in O(m + n) time and O(1) extra space. Example: A=[1,2,3,0,0,0], m=3; B=[2,5,6], n=3 -> A becomes [1,2,2,3,5,6].
MediumTechnical
62 practiced
Implement Rabin-Karp substring search in Python: find all start indices where pattern occurs in text using a rolling hash. Discuss choice of base and modulus, collision handling, and average/worst-case complexity. Provide code-level details for the rolling computation.
EasyTechnical
42 practiced
Describe how you'd write unit tests for a data preprocessing function normalize_and_fill(dataframe) that normalizes numerical columns and fills missing values. List edge cases and provide 3 pytest-style test examples (constant column, all-NaN column, extremely large values).

Unlock Full Question Bank

Get access to hundreds of Coding Fundamentals and Problem Solving interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.