Curated sets

Interview warm-up

Short whiteboard tasks to get the rust off.

All problems
Total results2,493 problems
TopicsJudge
MarathonerCount the listed students who finished within 6 hours and report the fastest one, breaking ties by race result order.Easy2ImplementationHash mapNo attempts yet2s64 MBJudgeable
Sequence Folding GameRepeatedly fold the list by adding symmetric pairs until two numbers remain, then Alice wins when the first is larger.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Triangle ClassificationFor each of T triples of side lengths, output whether it is equilateral, isosceles, scalene, or not a triangle.Easy2ImplementationNo attempts yet1s128 MBJudgeable
Arbiter LoginGiven the original and entered passwords, report login success or hint at a caps lock or num lock mistake.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Zombie InvasionProcess villages east to west, moving half of each village west and leaving at most one behind, with everything gathering on the west coast.Easy2SimulationMathNo attempts yet2s128 MBJudgeable
Arrangement of ContestCount the titles that form the longest unbroken run from A onward, using each title's first letter and stopping at the first missing letter.Easy2GreedyString+1No attempts yet2s256 MBJudgeable
BoxesBoxes fall straight down in each column of a grid, and the program sums how many cells all boxes move.Easy2SimulationMatrixNo attempts yet1s256 MBJudgeable
Text RollSimulate a ball that rolls right over non-space characters and drops down through spaces until it falls off the last line, then report its exit column.Easy2SimulationNo attempts yet1s128 MBJudgeable
Perfect Number CheckDecide whether each given integer equals the sum of its proper divisors and print the equation or a negative verdict.Easy2Number theoryImplementationNo attempts yet2s128 MBJudgeable
I Love CroatiaTrack the 210 seconds of answers and pass the bomb left on each correct answer to find who holds it when it explodes.Easy2SimulationNo attempts yet1s128 MBJudgeable
Roman Catholic MassThe program seats the latecomer in the empty spot with the most occupied neighbors and counts every adjacent occupied pair once.Easy2Brute forceMatrix+1No attempts yet1s128 MBJudgeable
Presidential ElectionEach voter ranks all candidates, and the program counts first-choice votes and then a top-two runoff to report the winner and the deciding round.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Contest Venue SetupCount the schools that have two of their teams seated in king-adjacent cells of an N by M grid with empty seats.Easy2MatrixImplementationNo attempts yet1s128 MBJudgeable
Combination LockCount distinct triples of dial positions within circular distance 2 of either of two given combinations.Easy2Brute forceMathNo attempts yet1s128 MBJudgeable
VicinityFor each query, count how many of the n points lie within distance d_v of the chosen base point, excluding the base point itself.Easy2Brute forceGeometryNo attempts yet1s128 MBJudgeable
Stone Game 5Two players alternately take 1 or 3 stones from a pile of N, and the program prints SK or CY for optimal play.Easy2Game theoryMathNo attempts yet1s128 MBJudgeable
Show Me The OperatorsEvaluate each space-separated expression in two left-to-right sweeps and print the operators in execution order with the final value.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Anti-Arithmetic PermutationFor each permutation of 0 to n-1, decide whether any three terms in order form an arithmetic progression.Easy2Brute forceMathNo attempts yet1s128 MBJudgeable
Fibonacci remainderFor each test case, compute the P-th Fibonacci number of the sequence starting 1, 1 modulo Q and print it as Case #x: M.Easy2MathSimulationNo attempts yet1s128 MBJudgeable
Word SearchingCount case-sensitive overlapping occurrences of a given word, each fully inside one line of the following text.Easy2String matchingStringNo attempts yet1s128 MBJudgeable
Jane's First WordsCheck each input word against the pattern da+dd?(i|y) and print whether Jane called for daddy or is cooing.Easy2String matchingStringNo attempts yet1s128 MBJudgeable
Rectangle intersectionCompute the area shared by all n axis-aligned rectangles, or 0 when they do not all overlap.Easy2GeometryIntervalsNo attempts yet2s512 MBJudgeable
CipherDecrypt a Caesar-shifted message by trying all 26 shifts and picking the one where both CHIPMUNKS and LIVE appear.Easy2Brute forceStringNo attempts yet2s512 MBJudgeable
EuclidRead two positive integers up to 32767 and print their greatest common divisor.Easy2Number theoryNo attempts yet2s512 MBJudgeable
LampGuards patrol in roster order, each toggling the lamps in one arithmetic progression, and you report how many lamps stay on.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Maximum FrequencyGiven N integers, count how many times each value appears and print the largest count.Easy2Hash mapArrayNo attempts yet2s1024 MBJudgeable
Zeros in a FactorialCount how many zero digits appear in the decimal representation of n factorial for a given n below 100.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
RouteCount the maximal runs of level, uphill, and downhill metre sections along the looped jogging route starting at pole 1.Easy2ArrayImplementationNo attempts yet2s1024 MBJudgeable
The Euclidean AlgorithmCount how many subtraction steps the original Euclidean algorithm needs to find the gcd of two integers up to 32767.Easy2SimulationMathNo attempts yet1s128 MBJudgeable
Word PuzzleDecide for each pair of strings whether the gathered letters can be rearranged to form the original word.Easy2Hash mapStringNo attempts yet3s256 MBJudgeable
Cedric's cypherDecrypt each Caesar-ciphered line using the trailing encrypted A to recover the shift and drop that marker.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
The Hardest Problem EverDecode each START/END block by shifting every uppercase letter five places back and leaving other characters unchanged.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
VoteEach judge votes for the most interesting game they can afford, and the game with the most votes wins.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Party InvitationSimulate m rounds of removing every person at a multiple of ri from the ordered list and print the survivors in order.Easy2SimulationArrayNo attempts yet2s256 MBJudgeable
Mirror TenderDecide for each test case whether one workshop's width and height ranges contain every other workshop's ranges.Easy2IntervalsNo attempts yet1s256 MBJudgeable
Microwave ButtonsPress the 5-minute, 1-minute, and 10-second buttons to total exactly T seconds with the fewest presses, or print -1 when impossible.Easy2GreedyMathNo attempts yet1s64 MBJudgeable
Palindrome LinesDecide for each of n short lines whether it reads the same forward and backward, ignoring letter case.Easy2Two pointersStringNo attempts yet1s256 MBJudgeable
Magic SquaresCheck each test case square by comparing every row, column, and both diagonal sums and report whether it is magic.Easy2MatrixSimulationNo attempts yet1s256 MBJudgeable
Clean UpRecompute each of the nine batting averages after adding the new series and reorder the lineup around the new best average.Easy2SimulationImplementationNo attempts yet1s256 MBJudgeable
Odysseus and the SirensThe program scores every melody under each candidate key by summing note penalties and prints the numbered key with the smallest total.Easy2ImplementationString+1No attempts yet1s256 MBJudgeable
Milo of Croton and the CalfSimulate Milo lifting the calf as it gains a pound a day, with strength gains after 3 days and soreness lasting 2 days, and report the first failure day.Easy2SimulationNo attempts yet1s256 MBJudgeable
Dice GameEach player rolls two dice with consecutive face ranges and the larger total wins, so compute both win probabilities from the four ranges.Easy2ProbabilityBrute forceNo attempts yet1s256 MBJudgeable
Train PassengersDecide if per-station counts of passengers leaving, boarding, and left waiting fit the train capacity and boarding rules.Easy2SimulationImplementationNo attempts yet1s256 MBJudgeable
HeadshotAfter a click on a circular cylinder, compare firing at once against spinning first and print which choice is safer.Easy2ProbabilityStringNo attempts yet1s64 MBJudgeable
Radix 32 ConversionConvert each base-32 string of up to 8 digits to its decimal value and to binary by expanding every digit to 5 bits.Easy2MathStringNo attempts yet1s64 MBJudgeable
Alarm ClockPrint the earliest hh:mm time whose four digits use exactly n lit segments, or Impossible when no such time exists.Easy2Brute forceImplementationNo attempts yet2s256 MBJudgeable
Pangram CheckerCount how many times each English letter appears in every sentence and print its pangram grade.Easy2StringHash mapNo attempts yet3s256 MBJudgeable
Queens on Bad TermsCheck an 8x8 board holding eight queens and print valid only when no two queens share a row, column, or diagonal.Easy2ImplementationMatrixNo attempts yet1s256 MBJudgeable
Hitting the TargetsCount, for each of up to 100 shot points, how many of up to 30 given rectangles and circles contain it, boundaries included.Easy2GeometryImplementationNo attempts yet2s256 MBJudgeable
The Wet KeypadGiven a permuted phone keypad, encode a message of up to 100 letters into multi-tap presses with # separators.Easy2ImplementationSimulationNo attempts yet1s32 MBJudgeable
Most Chosen NumberPick the number that appears most often in each test case, breaking ties by the smaller number.Easy2ArrayImplementationNo attempts yet5s256 MBJudgeable
Closest Web Color NameThe program maps each RGB triple to the closest of 16 named HTML colors by Euclidean distance, breaking ties by table order.Easy2Brute forceMathNo attempts yet2s256 MBJudgeable
Crossword Clue NumberingScan the grid for empty cells that begin a word of at least three cells across or down and print them in reading order.Easy2ImplementationMatrixNo attempts yet1s256 MBJudgeable
Cow RoutingFind the cheapest single flight route on which city A appears before city B, or report -1 when none exists.Easy2ImplementationArrayNo attempts yet1s256 MBJudgeable
Paprika ID CardsSimulate one left-to-right pass of conditional card swaps, then count paprikas whose final card matches their goal.Easy2SimulationArrayNo attempts yet1s256 MBJudgeable
Weather ForecasterClouds drift east one cell per minute, and each cell reports how many minutes until a cloud first arrives, or -1 if none ever does.Easy2SimulationArrayNo attempts yet1s256 MBJudgeable
Canteen CheckoutChoose the number of fixed-price 4-item set menus that minimizes the total bill for the tray.Easy2Brute forceMathNo attempts yet1s64 MBJudgeable
Wait TimeReconstruct message timestamps from the log and sum each friend reply wait time, reporting -1 for a friend with an unanswered message.Easy2SimulationHash mapNo attempts yet1s256 MBJudgeable
Rotating the basket orderPerform M given segment rotations on baskets numbered 1 to N and print the final left-to-right order.Easy2SimulationArrayNo attempts yet1s256 MBJudgeable
BeltsGiven each belt rotation ratio and twist, compute the last wheel speed and direction when the first wheel turns clockwise once per minute.Easy2SimulationMathNo attempts yet1s256 MBJudgeable
Counting FriendsCount the friends of each of N students from M mutual friendship pairs and print the N totals.Easy2GraphArrayNo attempts yet1s256 MBJudgeable
Divide the land into trianglesSort all pegs by x then y, split the order into consecutive triples, and print each triple's input numbers in increasing order.Easy2SortingNo attempts yet1s16 MBJudgeable
Veni, vidi, viciDrop the last letter of each odd-length ciphertext, then decode every letter pair into one plain letter with the given key.Easy2StringMathNo attempts yet1s256 MBJudgeable
Best guess in the random gamePick the number from 1 to N whose interval of radius K covers the most hidden values and report its coverage count.Easy2MathIntervalsNo attempts yet1s256 MBJudgeable
Base Conversion 2Convert the decimal number N to base B, writing digits above 9 as uppercase letters.Easy2MathImplementationNo attempts yet0.5s256 MBJudgeable
Inverse Move-to-Front TransformReconstruct the lowercase string from its move-to-front code by simulating the 26-letter list.Easy2SimulationArrayNo attempts yet2s256 MBJudgeable
Spring 2005: Arriving at USCFilter the building list to names that hold the abbreviation letters as a case-insensitive subsequence and print the matches in input order.Easy2Two pointersString matchingNo attempts yet1s256 MBJudgeable
Sieve of EratosthenesSimulate the sieve of Eratosthenes as described and print the K-th crossed-out number for each N and K pair.Easy2SimulationImplementationNo attempts yet1s256 MBJudgeable
ICPC CalculatorEvaluate a dot-indented prefix expression where + sums its operands and * multiplies them.Easy2RecursionTree+1No attempts yet1s256 MBJudgeable
Pattern Word BankingAdd the PIN digits picked by lowercase pattern letters and print non sequitur if the letter values do not match the PIN length.Easy2SimulationStringNo attempts yet2s256 MBJudgeable
Secret MessagePad each message with asterisks to a square, rotate the square 90 degrees clockwise, then read it row by row without asterisks.Easy2MatrixSimulationNo attempts yet2s256 MBJudgeable
Letter CookiesGiven the letters in a box, decide for each query word whether its letters can all be taken from the box.Easy2Hash mapStringNo attempts yet1s256 MBJudgeable
Negative People in Da HouseGiven each test case's sequence of entries and exits, compute the smallest initial occupancy that keeps the count nonnegative throughout.Easy2Prefix sumSimulationNo attempts yet1s256 MBJudgeable
ElectionFor each test case, count how many coins overlap each coin and print the top name or TIE on ties.Easy2GeometryBrute force+1No attempts yet1s256 MBJudgeable
Reverse the Binary DigitsRead N, write it in binary without leading zeros, reverse the digits, and print the reversed string as a decimal number.Easy2Bit manipulationMathNo attempts yet1s256 MBJudgeable
Toilet Seat PoliciesCount seat moves under leave-up, leave-down, and leave-as-preferred policies given the initial seat position and each person in order.Easy2SimulationNo attempts yet1s256 MBJudgeable
Flag QuizPrint the alternatives whose maximum position-wise difference to any other alternative is smallest.Easy2Brute forceArrayNo attempts yet1s256 MBJudgeable
Choosing an Exam SetYou compare exam sets by random-guess expected score and pick the highest, preferring fewer questions then the smaller number.Easy2ImplementationMathNo attempts yet1s256 MBJudgeable
ITAI VirusCount the initially infected cities plus every city directly joined to one by a single road.Easy2GraphImplementationNo attempts yet1s256 MBJudgeable
Creature Number SystemsConvert each given decimal number up to 5000 into the creature's base between 2 and 20, using letters A to J for digits above 9.Easy2MathImplementationNo attempts yet1s256 MBJudgeable
CypherDecrypt each message line by shifting its lowercase letters back by the Caesar shift computed from its date.Easy2StringMathNo attempts yet1s256 MBJudgeable
SolitaireSimulate token moves on cells 0 to N with a repeating six-roll generator and sum landed values until reaching N.Easy2SimulationNo attempts yet1s256 MBJudgeable
Coverity CrosswordDecide whether every listed word appears horizontally, vertically, or diagonally in an 8 by 8 letter grid.Easy2String matchingMatrix+1No attempts yet2s256 MBJudgeable
Eakspay igpay atinlay?Translate each phrase into Pig Latin by moving each leading consonant cluster to the end with ay, or adding yay after vowel-initial words.Easy2StringImplementationNo attempts yet1s256 MBJudgeable
Crushing ConfectionsFind the lexicographically smallest row or column triple of equal candies in each grid and print its positions.Easy2MatrixImplementationNo attempts yet1s256 MBJudgeable
The Big Eye in the SkyFor each point in the first quadrant, print its angle from the positive x-axis in degrees, rounded to the nearest integer.Easy2MathGeometryNo attempts yet1s256 MBJudgeable
Mr. Gorbachev, Tear Down This Wall!Add up the lengths of the axis-aligned wall segments and report the total work hours split across the workers, rounded up.Easy2MathImplementationNo attempts yet1s256 MBJudgeable
Distribution in MetagoniaRepeatedly peel off 2^a times the largest power of 3 fitting the odd part of the remainder until it hits zero, then print the pieces sorted.Easy2SimulationMath+1No attempts yet2s256 MBJudgeable
Lucky ChancesCount over every grid cell how many of the four directions contain only smaller numbers or reach the edge.Easy2Brute forceMatrix+1No attempts yet2s256 MBJudgeable
Spin the number wheelCount the wheel positions where the M digits read clockwise form a number between X and Y.Easy2Brute forceStringNo attempts yet1s256 MBJudgeable
Hidden PasswordDecide if scanning the message and skipping letters outside the remaining password set reproduces the password in order.Easy2SimulationStringNo attempts yet1s256 MBJudgeable
D as in DaedalusGiven each round budget and the cards played, compute the extra points the first player could have won by playing the best card each round.Easy2SimulationNo attempts yet3s256 MBJudgeable
Base ConversionConvert the given number written in base A into base B and print its digits separated by spaces.Easy2MathImplementationNo attempts yet2s256 MBJudgeable
Marko's T9 inputCount how many dictionary words map letter by letter to the given T9 digit string.Easy2StringHash mapNo attempts yet2s64 MBJudgeable
Egg Drop LogFrom the logged safe and broken drops, compute the lowest floor that could break and the highest floor that could stay safe.Easy2IntervalsImplementationNo attempts yet2s256 MBJudgeable
Stand on ZanzibarThe program adds yearly increases beyond twice the previous count to bound the number of imported turtles.Easy2MathImplementationNo attempts yet1s256 MBJudgeable
Cities Alice has visitedCount how many different city names appear in each trip log.Easy2Hash mapNo attempts yet1s256 MBJudgeable
Identifying Map TilesConvert a map tile quadkey into its zoom level and x and y coordinates.Easy2Bit manipulationStringNo attempts yet1s256 MBJudgeable
Dice CupFind the most likely sums of an N-sided and an M-sided die, printing every tied sum from lowest to highest.Easy2Brute forceMathNo attempts yet1s256 MBJudgeable
Easy ProblemsetSimulate judges proposing problems in turn and keep each proposal whose hardness reaches the running total until k problems are chosen.Easy2SimulationNo attempts yet1s256 MBJudgeable