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.

EasyTechnical
0 practiced
Implement a function in Python that determines whether a 32-bit signed integer is a power of two (positive powers only). Solve it using bit manipulation without loops. Discuss edge cases (e.g., zero, negative inputs) and time/space complexity.
HardTechnical
0 practiced
Implement an LRU (Least Recently Used) cache in Python that supports get(key) and put(key, value) in O(1) time. Describe the data structures used (doubly-linked list + hashmap), discuss how to test eviction behavior, and outline thread-safety concerns if this cache is used in a multi-threaded environment.
HardTechnical
0 practiced
Implement an efficient popcount (count of set bits) for a 64-bit integer in Python. Show Brian Kernighan's method and discuss built-in optimizations. Then, given an array where every number appears k times except for one (which appears once), design the bitwise counting algorithm to recover that single number (generalize for any k).
EasyTechnical
0 practiced
You're given an array of categorical values (e.g., user event types from logs). Implement in Python a function that returns a frequency mapping of each distinct value. Provide an implementation that works in one pass, and then explain how you'd adapt it for a streaming input where the dataset doesn't fit in memory.
MediumTechnical
0 practiced
Given a singly-linked list, detect whether it contains a cycle and, if so, return the node where the cycle begins. Implement Floyd's Tortoise and Hare algorithm in Python, describe why it uses O(1) extra space, and provide a proof sketch for correctness.

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.