Question Bank
Coding & Algorithms interview questions
An algorithm interview requires more than working code: explain why the solution is correct. Start with examples and constraints, then choose a data structure and estimate complexity. Check empty inputs, repeated values and boundary cases.
Showing 20 of 44 questions
Find the length of the longest substring without repeating characters.
Implement topological sort for a directed graph and detect if it contains a cycle.
Split array into k contiguous subarrays minimizing the maximum subarray sum (binary search on answer).
Given an m×n matrix, return all elements in spiral order.
Design a data structure that supports addNum(num) and findMedian() for a stream of numbers.
Find all starting indices of substrings in s that are concatenations of all words in any order (all words same length).
Given stock prices and at most k transactions, find the maximum profit.
Implement a data structure with insert, remove, and getRandom — all in O(1). getRandom returns a uniformly random element.
Given server logs [timestamp, server_id, start/end], find the time interval with maximum concurrent active servers. Handle 10⁸ logs efficiently.
To clarify why I am asking: have you solved LeetCode problems, at least easy ones?
Practice in botWhat is your algorithms experience? Have you practiced LeetCode, and do you write in Python?
Practice in botWhat approaches are available for encoding categorical features?
Practice in botAre there methods that do not depend on already having a trained model?
Practice in botInstead of doing everything in a function, computing it, and putting it all into an array?
Practice in botUnder what conditions will line 17, after the loop, execute? Will it execute when we reach the last element?
Practice in botIs the algorithm O(n) because we iterate over every element in the list?
Practice in botPrepare for your next interview with Vibe Interview.
Download Vibe Interview