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.

MediumTechnical
38 practiced
Implement a Python function that checks whether a signed integer n is a power of two without using loops over bits. The function should return False for non-positive numbers and handle edge cases. Explain the bitwise trick and why it works.
MediumTechnical
43 practiced
You're reviewing a colleague's Python function that sometimes produces incorrect outputs on edge inputs. Describe a systematic debugging approach: how to reproduce the bug, design unit tests (including property-based testing), add logging and assertions, use debuggers and profilers, and ensure your fix doesn't introduce regressions.
EasyTechnical
39 practiced
Implement a level-order traversal (BFS) of a binary tree in Python that returns a list of lists of node values, one list per depth level. Define TreeNode with 'val', 'left', and 'right'. Aim for O(n) time and O(w) space where w is the maximum width. Include an example input and output and describe tests for skewed and empty trees.
MediumTechnical
33 practiced
Implement in Python a function that returns the length of the longest substring without repeating characters for a given ASCII string. Your solution should run in O(n) time and O(min(n, charset)) space. Provide an example and discuss edge cases like empty string and full ASCII set.
MediumTechnical
35 practiced
Given a sorted array that may contain duplicates, implement in Python two functions: first_occurrence(arr, target) and last_occurrence(arr, target), each running in O(log n) time. If target is not present return -1. Explain how you avoid infinite loops and off-by-one errors.

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.