Interview questions
Find a company or topic. Read the sources, then practice.
Loading the question library…
Find a company or topic. Read the sources, then practice.
Loading the question library…
Showing 801–825
Given an array of ribbon lengths and a target k, determine the maximum integer piece length you can cut the ribbons into so that you…
Companies: Meta
Last reported Jan 2026
Given an integer array, repeatedly remove contiguous subarrays that are palindromes and return the minimum number of moves to delete the whole array. This is…
Companies: Yahoo
Last reported Jan 2026
Companies: OpenAI
Segmentation & Cohort Analysis
Last reported Jan 2026
Given an array of non-negative heights representing elevation bars, compute the total amount of water that can be trapped after rainfall. The core challenge is…
Companies: Apple, Goldman Sachs
Last reported Jan 2026
Given an m×n binary matrix, find the area of the largest axis-aligned square submatrix that contains only '1's. This is a classic DP problem (m,n…
Companies: eBay, Expedia
Array · Dynamic Programming · Matrix
Last reported Jan 2026
Companies: OpenAI
Grids & Matrices · Stacks & Queues
Last reported Jan 2026
Implement functionality to analyze and report file system sizes. This includes calculating sizes of individual entities (files/folders), finding the largest files in a…
Companies: Google
Last reported Jan 2026
Companies: OpenAI
Data Structure Design · Memory Management
Last reported Jan 2026
Evaluate a Lisp-like expression string containing integers, variable references, and nested (let / add / mult) forms. The core challenge is parsing the nested syntax…
Companies: Google
Last reported Jan 2026
Compress an array of characters in-place by replacing each run of consecutive identical characters with the character followed by its run length (omit the length…
Companies: Apple, Goldman Sachs, Morgan Stanley, Pinterest +1
String · Two Pointers
Last reported Jan 2026
Insert a given interval into a sorted list of non-overlapping intervals and merge any overlaps so the final list remains sorted and disjoint. The core…
Companies: Fanduel, Google, Meta
Last reported Jan 2026
Given an array with duplicates, implement a Solution class whose pick(target) method returns a uniformly random index i such that nums[i] == target. Must support…
Companies: Meta
Last reported Jan 2026
Given two integer arrays, return two counts: how many indices in nums1 have values that appear anywhere in nums2, and how many indices in nums2…
Companies: Bnsf
Last reported Jan 2026
Given an m×n binary grid where 0 represents ocean and 1 represents land, find all islands that are completely surrounded by ocean (not touching the…
Companies: Meta
Last reported Jan 2026
Given a BST and two nodes p and q, find their lowest common ancestor — the deepest node that is an ancestor of both. Leverage…
Companies: LinkedIn
Last reported Jan 2026
A multi-part coding exercise involving data extraction, transformation, and string manipulation with nested data structures. Candidates must build solutions iteratively…
Companies: Stripe
Last reported Jan 2026
Generate a bingo card with randomized blank spaces while maintaining specified constraints for rows and columns.
Companies: Uber
Last reported Jan 2026
Two players alternate moves along edges of an undirected graph: the mouse starts at 1, the cat at 2 (cat cannot enter node 0), and…
Companies: Google
Last reported Jan 2026
Design a data structure that supports creating, updating, deleting and marking todo items complete while allowing efficient queries (by id, status, and ordered by creation…
Companies: Meta
Last reported Jan 2026
Return all characters (including duplicates) that appear in every lowercase string in the input list — equivalently compute the intersection of character multisets by taking…
Companies: Life360
Last reported Jan 2026
Given a sorted array of integers and a target value K, find the smallest element in the array that is greater than K. Return -1…
Companies: Meta
Last reported Jan 2026
Implement functions to serialize a JSON object to a string and deserialize a JSON string back to an object. The solution should handle proper conversion…
Companies: Meta
Last reported Jan 2026
Given an integer array, find the minimum number of ±1 moves needed to make all elements equal — equivalently, choose a target value that minimizes…
Companies: PayPal
Last reported Jan 2026