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
0 practiced
Find the k-th largest element in an unsorted array. Implement two Python approaches: (1) a min-heap of size k (heapq), and (2) randomized Quickselect with expected O(n) time. Explain worst-case behaviors and when you'd pick each approach in practice.
MediumTechnical
0 practiced
Implement binary search variations in Python to find the first and last occurrence of a target value in a sorted array that may contain duplicates. Return [-1, -1] if target isn't present. Explain loop invariants and common off-by-one pitfalls.
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.
HardTechnical
0 practiced
Find the median of two sorted arrays (sizes m and n) in O(log(min(m,n))) time. Describe and implement the binary-search-on-partition approach in Python, handle edge cases (empty arrays, differing sizes), and explain correctness and complexity.
HardTechnical
0 practiced
Given a string s, find the longest palindromic substring. Discuss simple center-expansion (O(n^2)), dynamic programming (O(n^2) time/space), and outline Manacher's algorithm (O(n)). Implement center-expansion in Python and explain why Manacher is faster for long inputs.

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.