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 2,201–2,225
Given an m×n grid of positive integers, determine whether a single horizontal or vertical cut between rows or columns can split the grid into two…
General practice
Determine whether a single straight horizontal or vertical cut can split an m×n grid into two non-empty parts whose sums are equal, or can be…
General practice
Given a binary tree with integer node values, determine whether removing a single edge can split it into two trees whose node-value sums are equal…
General practice
Given two strings where you may only add or remove characters at the ends, find the minimum number of such operations to make them identical…
General practice
Given a set of 2D points, compute the minimal-perimeter fence that encloses them and return all points that lie on the fence boundary. This is…
General practice
Given a set of 2D points, compute the smallest convex polygon (fence) that encloses all points and return all points that lie on its boundary…
General practice
Determine if you can reach target from source on a 10^6×10^6 grid with at most 200 blocked cells — the key challenge is that the…
General practice
On an infinite grid where you and ghosts move 1 step (or stay) per turn, determine whether you can reach the target strictly before every…
General practice
Given a full binary tree where leaves are boolean constants (0 = False, 1 = True) and internal nodes are operators (2 = OR, 3…
General practice
Given a string boolean expression using literals 't'/'f', operators '!' (NOT), '&' (AND), '|' (OR) and parentheses with comma-separated operands, evaluate it to a boolean…
General practice
Companies: Google
Divide and Conquer · Hash Table · Math · Stack
Implement an EventEmitter that maintains ordered listener lists per event name, supporting subscribe (adds a callback and returns an object with an unsubscribe method to…
General practice
Convert the Excel column title into its numeric index by interpreting the string as a base-26 number where 'A'..'Z' map to 1..26. Input is 1–7…
General practice
Convert the given positive integer to its Excel column title by expressing it in a bijective base-26 system (letters A–Z represent values 1–26) and mapping…
General practice
Given a table of students with consecutive integer ids starting at 1, return the rows where each adjacent pair of students (ids 1&2, 3&4, ...)…
Companies: Tesla, Zomato
Database
Run all given no-argument async functions in parallel and return a promise that resolves with an array of their results in the original order once…
General practice
Given an n×n grid and a start cell, for each suffix of a movement string (L/R/U/D) determine how many instructions the robot can execute before…
General practice
Determine whether any contiguous length-2 substring of a given string s also appears in s reversed; return true if such a pair exists, otherwise false.
General practice
Companies: Citadel
Companies: NVIDIA
Count how many words can be transformed into s by expanding letter groups: a word is stretchy if it has the same sequence of character…
General practice
Given a string s and a dictionary of words, choose non-overlapping substrings of s that are dictionary words to maximize covered characters (equivalently minimize the…
General practice
Companies: Anthropic