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,026–2,050
Given an encoded string where letters append to a tape and digits 2–9 repeat the entire current tape, return the k-th character of the fully…
General practice
Given an array where a move decrements any element by 1, return the minimum number of decrements needed to make the array zigzag (either every…
General practice
Given a sequence of strings, you must process them in order and for each string choose to append or prepend it to the current result…
General practice
Decode a string where single digits '1'–'9' map to 'a'–'i' and two-digit numbers followed by '#' ('10#'–'26#') map to 'j'–'z'. Scan the input and translate…
General practice
Recursively merge two nested (JSON-like) objects into a single object, combining keys and merging sub-objects while resolving conflicts. When a key exists in both, merge…
General practice
Recursively traverse a nested object/array structure and apply a predicate to decide which values or entries to keep, returning a new object with keys removed…
General practice
Return the sum of the node values at the maximum depth of a binary tree — i.e., find the deepest level and sum all leaf…
General practice
Replace each element in a circular array with the sum of the next k elements (if k>0), the previous |k| elements (if k<0), or 0…
General practice
Find the smallest length contiguous subarray whose degree (maximum element frequency) equals the degree of the whole array — essentially identify the elements that achieve…
General practice
Given an array of Promises and a delay in milliseconds, return a Promise that resolves to the array of each promise's result but only after…
General practice
Companies: Mitsogo
Array · Counting · Hash Table
Given a lowercase string s, delete the minimum number of characters so that no character appears three times consecutively, and return the resulting (uniquely determined)…
General practice
Given an array of equal-length strings forming a grid, count how many column indices contain characters that are not sorted lexicographically from top to bottom…
General practice
Given an array of equal-length strings, remove the minimum number of column indices so that the resulting strings (after deletions) are in nondecreasing lexicographic order…
General practice
Given n equal-length strings, delete the fewest column indices so that in every row the remaining characters are non-decreasing. This is equivalent to finding the…
General practice
Remove duplicate rows in the Person table so that for each email only the row with the smallest id remains. Implement this as a DELETE…
General practice
Given a list of absolute folder paths, build the directory tree and delete every folder (and its entire subtree) whose subfolder structure and names are…
General practice
Given an m×n matrix, repeatedly remove the greatest element from each row and add the maximum of those removed elements to a running total until…
General practice
Given a binary tree and a target value, repeatedly remove all leaf nodes whose value equals the target; removals may create new leaves that also…
General practice
General practice
Find the minimum number of single-character deletions across two strings to make them identical; this reduces to computing their longest common subsequence (LCS), with the…
General practice
Given a rooted tree (via a parent array) and values for each node, remove all subtrees whose total node-sum equals zero (deletions cascade) and return…
General practice
Given an ordered list of boxes (port, weight) and ship limits on maxBoxes and maxWeight, partition the sequence into contiguous delivery batches (respecting capacity) to…
General practice