InterviewStack.io LogoInterviewStack.io

Algorithmic Problem Solving Fundamentals Questions

Core foundation for solving entry level algorithmic problems. Focuses on arrays, strings, basic mathematics and number theory problems, simple bit manipulation, basic linked list and tree operations, stacks and queues, basic sorting and searching algorithms, simple recursion, and use of hash based data structures for counting and lookup. Emphasizes understanding asymptotic time and space complexity, selecting appropriate data structures for a task, and clear step by step problem solving including writing a brute force solution and analyzing correctness.

MediumTechnical
53 practiced
Implement an iterative inorder traversal of a binary tree without recursion. Provide code in your preferred language and explain why this uses O(n) time and O(h) space where h is tree height. Mention edge cases such as highly skewed trees.
HardTechnical
59 practiced
Given a non-empty binary tree, find the maximum path sum where the path may start and end at any node. Implement in Python using recursion: for each node calculate the maximum contribution to parent and update a global maximum path sum. Handle negative node values correctly. Analyze time/space complexity.
MediumTechnical
78 practiced
Design serialize and deserialize functions for a binary tree using level-order (BFS). Implement both in Python: serialize(root) -> string and deserialize(string) -> root. Explain how you represent null nodes, how you parse the string, and how you handle empty trees and trailing nulls. Analyze time and space complexity.
MediumTechnical
60 practiced
Given a string s, find the length of the longest substring without repeating characters. Implement an optimal sliding-window approach in Python and explain why it runs in O(n) time. Provide examples and discuss handling of unicode characters and large alphabets.
MediumTechnical
61 practiced
Given a list of strings, group anagrams together and return a list of groups. Implement in Python and discuss canonicalization choices (sorted string as key vs character count tuple) and their time/space trade-offs. Example: ['eat','tea','tan','ate','nat','bat'] -> [['eat','tea','ate'],['tan','nat'],['bat']].

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.