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
43 practiced
Implement quickselect in Python to find the k-th largest element in an unsorted array in average O(n) time. Provide code for randomized pivot selection, explain expected vs worst-case complexity, and show how to modify to find k-th smallest. Include considerations for duplicate elements.
HardTechnical
41 practiced
Given an array of integers, implement min_window_substring_like(nums, target_counts) in Python that finds the minimum-length contiguous subarray whose element counts cover target_counts (a dict of required counts for some integers). This is the numeric analog to "minimum window substring". Provide O(n) sliding-window solution and discuss correctness proof.
HardTechnical
45 practiced
Given a large unsorted dataset of integers stored on disk, describe an algorithm to find the k-th smallest element using external memory (limited RAM). Discuss how to use selection by sampling, partitioning with disk-based scans, and multi-pass external quickselect or using external sorts. Explain I/O cost trade-offs.
EasyTechnical
73 practiced
Write a Python function gcd(a, b) that computes the greatest common divisor using the Euclidean algorithm. Provide both iterative and recursive versions, explain time complexity (in terms of number of digits), and describe behavior for negative inputs and zero. Also explain how to compute lcm(a, b) using gcd.
EasyTechnical
50 practiced
Write a Python function reverse_inplace(chars: List[str]) that reverses a list of characters in place (O(1) extra space). Example: input ['h','e','l','l','o'] -> ['o','l','l','e','h']. Provide working code, explain time and space complexity, and discuss edge cases (empty list, single character). Do not allocate another list or use built-in reverse().
Unlock Full Question Bank
Get access to hundreds of Algorithmic Problem Solving Fundamentals interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.