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,551–2,575
First Round OA - 4 LC Questions First two very easy. Last two were pretty hard. Second Last question was a leetcode hard of String…
Companies: Uber
Given a Users table (user_id, name), write a query to normalize each name so only the first character is uppercase and the rest are lowercase…
General practice
Given raw product name strings, normalize them into a consistent format by trimming/condensing whitespace, normalizing separators/punctuation, and applying consistent casing…
General practice
Given a sorted (strictly increasing) integer array, find an index i such that A[i] == i and return it (or -1 if none). Use the…
General practice
Return a 1-indexed list of strings for numbers 1..n where multiples of 3 are replaced by "Fizz", multiples of 5 by "Buzz", and multiples of…
General practice
Coordinate four threads to print the FizzBuzz sequence from 1..n in order: implement a thread-safe FizzBuzz class where each thread (fizz, buzz, fizzbuzz, number) prints…
General practice
Simulate and analyze a stream of booking, cancellation, and waitlist events across multiple flights to compute metrics such as current/max occupancy, waitlist lengths, and wait…
General practice
Given a binary tree and a target preorder sequence voyage, find the minimum set of nodes to flip (swap their left and right children) so…
General practice
Given a binary m×n matrix, determine the maximum number of rows that can be made all-equal (all 0s or all 1s) by flipping any subset…
General practice
Determine whether two binary trees are identical up to any number of left/right child swaps at nodes — i.e., whether you can make one tree…
General practice
Given a string of '+' and '-', return all distinct strings obtainable by making one valid move: flipping any consecutive "++" into "--". This tests…
General practice
Given a string of '+' and '-', two players alternate turning any consecutive "++" into "--"; determine whether the starting player can force a win…
General practice
Given an m×n integer matrix and top-left coordinates (x, y) with side length k, reverse the order of rows inside that k×k submatrix (i.e., flip…
General practice
Given a binary string, compute the minimum number of bit flips needed to make it monotone increasing (all 0's then all 1's). The core challenge…
General practice
Given an n×n binary matrix, horizontally reverse each row and then invert every bit (0↔1), returning the transformed matrix. This can be done in-place by…
General practice
Color the vertices of an undirected graph (n gardens, edges given by paths) with one of 4 flower types so that adjacent vertices have different…
General practice
Determine whether given element(s) can form valid chemical bond(s) according to simple bonding rules (e.g., matching valence electron counts or allowed element pairs). This…
General practice
Check if you can locate each groups[i] as a contiguous, non-overlapping subarray of nums in the same order as groups. Essentially it's an ordered pattern-matching…
General practice
Given costs for digits 1–9 and a total budget target, return the largest possible positive integer (as a string) whose digits' costs sum exactly to…
General practice
Given two arrays of unique digits (1–9), find the smallest integer that contains at least one digit from each array; if they share a digit…
General practice
Given an array of integers (n up to 10^4, values up to 10^5), find elements that have exactly four divisors—which occur only for p^3 or…
General practice
Parse a string of signed fractions, sum them correctly accounting for signs (e.g., by accumulating with a common denominator or using LCM), and return the…
General practice