Question Bank
Interview Practice Questions
1,600+ practice questions organized by topic, company tag, and difficulty.
Showing 20 of 1635 questions
A Bloom filter has a false positive rate. How does it depend on parameters (array size m, number of hash functions k, number of elements n)? How to choose optimal parameters?
Compare Bloom filter vs hash set. When is Bloom filter preferable? Give real-world examples.
Given an array of integers and a target value, find two numbers that add up to target and return their indices.
Given a string containing '(', ')', '{', '}', '[', ']', determine if the input string has valid brackets.
Given a sorted and rotated array, find the minimum element in O(log n).
Merge two sorted linked lists into one sorted linked list.
Find the k-th largest element in an unsorted array.
Design and implement an LRU (Least Recently Used) Cache with O(1) get and put.
Given an array of intervals, merge all overlapping intervals.
Find the diameter of a binary tree (longest path between any two nodes).
Given a 2D grid of '1's and '0's, count the number of islands (connected components of 1s).
Implement a Trie (prefix tree) with insert, search, and startsWith operations.
Find the length of the longest increasing subsequence (LIS) in an array.
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.
Prepare for your next interview with Vibe Interview.
Download Vibe Interview