Curated sets

Interview warm-up

Short whiteboard tasks to get the rust off.

All problems
Total results2,493 problems
TopicsJudge
Polynomial Derivative (Small)Given the nonzero terms of a polynomial, compute the value of its derivative at x = 1.Easy1MathImplementation+1No attempts yet1s128 MBJudgeable
FizzBuzzPrint the numbers 1 through N, writing Fizz for multiples of X, Buzz for multiples of Y, and FizzBuzz for multiples of both.Easy1ImplementationMath+2No attempts yet1s512 MBJudgeable
Final ScoreGiven the rosters of two teams and the names of the goal scorers, count each team's goals and decide which team scored more.Easy1Hash mapImplementation+1No attempts yet2s512 MBJudgeable
Sim CardFor each student, compute the smallest total cost of call minutes and data across the three fixed operator price plans.Easy1ImplementationBrute force+1No attempts yet2s512 MBJudgeable
Vera's FashionGiven N tops and N bottoms colored 1 to N, count how many top and bottom pairs have different colors.Easy1MathCombinatorics+1No attempts yet2s256 MBJudgeable
Helmet and VestGiven a list of helmet defense values and a list of vest values, print the sum of the best helmet and the best vest.Easy1ArrayImplementation+2No attempts yet1s512 MBJudgeable
What Is Your Name Score?Given an uppercase name, sum the alphabetical position of each letter and print the total.Easy1StringImplementationNo attempts yet1s128 MBJudgeable
Command PromptGiven N equal-length file names, output a pattern where each position is the common character if all names agree there, or a question mark otherwise.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Hansu NumbersCount integers from 1 to N (N up to 1000) whose digits form an arithmetic sequence.Easy2ImplementationBrute force+1No attempts yet2s128 MBJudgeable
Make It DivisibleFind the smallest two-digit replacement (00-99) for the last two digits of N that makes N divisible by F.Easy2Brute forceMath+1No attempts yet2s128 MBJudgeable
White SquaresGiven an 8x8 board marked with pieces and empty cells, count how many pieces sit on the white squares of the standard alternating coloring.Easy2ArrayImplementation+1No attempts yet2s128 MBJudgeable
Word CountCount the number of space-separated words in a string that may have leading or trailing spaces.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Most Frequent LetterCount letter frequencies in a string, case-insensitively, and print the most common letter in uppercase or a question mark on ties.Easy2Hash mapString+1No attempts yet2s128 MBJudgeable
Basketball GameGiven N surnames, count first letters and print all letters (in order) that start at least five surnames, or PREDAJA if none does.Easy2Hash mapImplementation+1No attempts yet1s128 MBJudgeable
Word SortingDeduplicate a list of words and sort them first by length, then lexicographically.Easy2SortingStringNo attempts yet2s256 MBJudgeable
Sign of Integer SumsFor three separate lists of integers, compute each sum and print whether it is positive, negative, or zero, handling values up to 64-bit signed range.Easy2ImplementationMathNo attempts yet2s256 MBJudgeable
Splitting a WordSplit a lowercase word into three nonempty parts, reverse each part, and find the lexicographically smallest concatenation among all splits.Easy2StringBrute force+1No attempts yet2s128 MBJudgeable
Mobile Phone BillGiven up to 20 call durations, compute total cost under two per-block billing plans and print the cheaper one with its cost.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
House Number SignCompute the total width of a house-number sign given fixed per-digit widths and 1 cm margins between digits and at both ends, for each input number until 0 appears.Easy2ImplementationString+1No attempts yet1s128 MBJudgeable
Easy Sequence SumGiven a sequence where each integer k repeats k times, compute the sum of terms between positions A and B.Easy2MathSimulation+1No attempts yet2s128 MBJudgeable
Choosing a Team NameCount letters L,O,V,E across a fixed name plus each candidate string, compute a formula mod 100, and print the candidate with the highest value, breaking ties by lexicographic order.Easy2StringImplementation+1No attempts yet2s128 MBJudgeable
TV SizeGiven a TV's diagonal length and height-to-width ratio, compute the actual height and width, flooring non-integer results.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Group Word CheckerCount how many of up to 100 lowercase words have every repeated character forming a single contiguous block.Easy2StringImplementationNo attempts yet2s128 MBJudgeable
Year Progress BarGiven a date and time string, compute what percentage of the current year (accounting for leap years) has elapsed.Easy2ImplementationMathNo attempts yet2s128 MBJudgeable
Actual Disk SpaceGiven N file sizes and a cluster size, compute total disk space used by rounding each file up to the nearest cluster multiple and summing.Easy2MathImplementation+1No attempts yet2s128 MBJudgeable
Yujin NumberGiven an integer up to about 2.1 billion, determine whether some split of its digits into a left and right part yields equal digit products.Easy2StringBrute force+1No attempts yet2s128 MBJudgeable
Reversed AdditionReverse the digits of two numbers up to 1000, add the reversed values, then reverse the sum and print the result.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
PetSimulate feeding and exercising a pet's weight across scenarios and report whether it ends happy, sad, or dead based on simple weight thresholds.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Most Frequent LettersCount lowercase letter frequencies across up to 50 lines of text and print all letters tied for the highest frequency in alphabetical order.Easy2Hash mapString+1No attempts yet2s128 MBJudgeable
EarringsGiven girl names and 2n-1 confiscation/return records tagged with a number and a letter, find the girl whose number appears only once and thus never got her earring back.Easy2Hash mapArray+1No attempts yet1s128 MBJudgeable
Floor DecorationCount the number of wooden planks by counting maximal runs of consecutive '-' in each row and '|' in each column of a grid.Easy2MatrixImplementation+1No attempts yet2s128 MBJudgeable
Song ScoresGiven cumulative durations of N song scores, answer Q queries asking which score is being sung at a given time using prefix sums and search.Easy2Prefix sumBinary search+1No attempts yet2s128 MBJudgeable
24-Hour MissionGiven the current time and a start time in HH:MM:SS, compute the time remaining until the start time next occurs within a 24-hour cycle.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Sort Digits DescendingRearrange the digits of a given natural number so they appear in descending order and print the result.Easy2SortingString+1No attempts yet2s128 MBJudgeable
Organizing BooksSimulate packing books into boxes in order, sealing a box once the next book no longer fits, and sum the leftover capacity of every box.Easy2SimulationImplementation+1No attempts yet2s128 MBJudgeable
Time MachineGiven three two-digit numbers from a digital clock, count how many of the 6 permutations form a valid HH:MM:SS time.Easy2CombinatoricsBrute force+1No attempts yet2s128 MBJudgeable
Internet Cafe Seat RequestsGiven a sequence of seat requests for 100 computers, count how many requests are rejected because the requested seat is already taken.Easy2SimulationArray+1No attempts yet2s128 MBJudgeable
Room NumberGiven a room number, count how many plastic digit sets (0-9 each) are needed, treating 6 and 9 as interchangeable when flipped.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Adjusted AverageGiven N exam scores, rescale each by dividing by the maximum score and multiplying by 100, then output the average of the rescaled scores.Easy2ArrayMath+1No attempts yet2s128 MBJudgeable
BallTrack which of three cups covers a ball as cups swap positions M times, then output the cup number holding it.Easy2SimulationImplementationNo attempts yet2s128 MBJudgeable
Sequence TransformationRepeatedly replace a sequence with its adjacent differences K times and print the resulting shorter sequence.Easy2ArraySimulation+1No attempts yet2s128 MBJudgeable
Manhattan Distance on a Four-Row Number BoardGiven two numbers placed column by column in a 4-row grid, compute the Manhattan distance between their cell positions.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Find Places to Lie DownCount maximal horizontal and vertical runs of at least two consecutive empty cells in an N x N grid.Easy2MatrixSimulationNo attempts yet2s128 MBJudgeable
Trophy DisplayCount how many trophies form a visible prefix-maximum sequence when scanning the row from the left and separately from the right.Easy2ArrayImplementationNo attempts yet2s128 MBJudgeable
Chicken CouponsGiven n chicken coupons and a stamp-to-coupon exchange rate k, compute the maximum chickens obtainable by repeatedly redeeming stamps for new coupons.Easy2MathSimulation+1No attempts yet2s128 MBJudgeable
Growth PointsSimulate a tree that multiplies its leaves by a yearly factor then subtracts pruned branches, and report the final leaf count.Easy2SimulationMathNo attempts yet1s128 MBJudgeable
Next Term in a SequenceGiven a sequence that is either arithmetic or geometric, determine which type it is and output its next term.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Fraction SumAdd two given fractions and output the sum reduced to lowest terms using GCD.Easy2MathNumber theory+1No attempts yet2s128 MBJudgeable
Concatenating Numbers 1Compute the total digit count when integers from 1 to N are written consecutively without spaces.Easy2MathImplementationNo attempts yet0.15s128 MBJudgeable
Packing Books into BoxesGiven book weights in order and a per-box weight limit, compute the minimum number of boxes needed by greedily filling each box in sequence.Easy2GreedyArray+1No attempts yet2s128 MBJudgeable
Numbers With Equal Remainder and QuotientGiven N, find the sum of all positive integers x whose quotient and remainder are equal when divided by N.Easy2MathNo attempts yet2s256 MBJudgeable
Octopus NumbersConvert base-8 strings using nine special symbols (including one for digit -1) into their decimal integer values until a terminator line appears.Easy2StringMath+1No attempts yet1s128 MBJudgeable
Good License PlatesFor each license plate, compute a base-26 value from the three letters and compare it to the four-digit number, printing whether their difference is within 100.Easy2StringImplementation+1No attempts yet1s128 MBJudgeable
Fourth PointGiven two adjacent sides of a parallelogram as endpoint coordinates, compute and print the fourth vertex for each line of input.Easy2GeometryMath+1No attempts yet2s128 MBJudgeable
Making AnagramsGiven two lowercase words, compute how many letters must be deleted in total so their remaining letters match as multisets (anagrams).Easy2Hash mapStringNo attempts yet2s128 MBJudgeable
Year 2007Given a month and day in 2007, compute and print the corresponding day of the week starting from Monday, Jan 1.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Least Common MultipleFor each of up to 1000 pairs of numbers, compute and print the least common multiple.Easy2MathNumber theoryNo attempts yet1s128 MBJudgeable
Counting Pentagon PointsCompute the total pentagonal points after N steps using a simple arithmetic formula, modulo 45678.Easy2MathImplementationNo attempts yet2s256 MBJudgeable
Perfect SquaresGiven two numbers M and N up to 10000, sum all perfect squares in that inclusive range and print the smallest one, or -1 if none exist.Easy2MathBrute force+1No attempts yet2s128 MBJudgeable
Counting PrimesCount how many of up to 100 given numbers (each at most 1000) are prime.Easy2MathBrute forceNo attempts yet2s128 MBJudgeable
PlugsGiven N power strips each with a plug capacity, compute the max number of computers powered when strips are chained from one wall outlet.Easy2MathGreedy+1No attempts yet2s256 MBJudgeable
Self-Replicating NumberCheck whether squaring an integer N reproduces N as the trailing digits of N squared.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Day of the YearGiven day, month, year, compute the day's ordinal number within that year accounting for leap years, until a 0 0 0 terminator.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Number GameRepeatedly sum decimal digits of each number until one digit remains, processing lines until a terminating zero.Easy2MathImplementationNo attempts yet2s128 MBJudgeable
Prime WordSum letter values (a-z=1-26, A-Z=27-52) for a word and print whether the sum is prime (with 1 counted as prime).Easy2StringMath+1No attempts yet2s128 MBJudgeable
Dobby's Case-Insensitive Word TestFor each test case, output the original-cased word that is smallest in dictionary order when comparisons ignore letter case.Easy2StringSorting+1No attempts yet1s128 MBJudgeable
Restoring NumbersFor each given integer up to 100,000, output its prime factorization as prime-exponent pairs in increasing order.Easy2MathNumber theory+1No attempts yet2s128 MBJudgeable
Sum of Consecutive IntegersGiven two integers, print the sum of all integers in the closed range between them, handling either order.Easy2MathImplementationNo attempts yet0.25s128 MBJudgeable
Weather Intern's Temperature SumGiven N daily temperatures, find the maximum sum over any contiguous window of exactly K days.Easy2Sliding windowArrayNo attempts yet1s128 MBJudgeable
Right-Aligned StarsPrint N lines of right-aligned stars, where line i has i stars padded with leading spaces to align the right edge.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Star Printing - 6Print a centered triangle of stars whose width decreases by 2 each line from 2N-1 down to 1.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Star Printing - 8Print a diamond-like star pattern of width 2N where side star counts rise from 1 to N then fall back to 1, with spaces filling the middle.Easy2ImplementationSimulationNo attempts yet1s128 MBJudgeable
Intelligent TrainSimulate passengers getting off and on at four stations and output the maximum train occupancy at any point.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Intelligent Train 2Given boarding and alighting counts at 10 stations, simulate the running passenger total and print its maximum value.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
Dice GameFor each player's three dice rolls, compute a prize using given rules and print the maximum prize among all players.Easy2SimulationImplementationNo attempts yet1s128 MBJudgeable
Three DiceGiven three dice values from 1 to 6, compute a prize following fixed rules for triples, pairs, or all different values.Easy2ImplementationNo attempts yet1s128 MBJudgeable
Longest Digit RunFor three given eight-digit numbers, print the length of the longest run of identical consecutive digits in each.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Find the K-th DivisorGiven N and K, find and print the K-th smallest divisor of N, or 0 if it doesn't exist.Easy2MathBrute forceNo attempts yet1s128 MBJudgeable
Score CalculationCompute a total score from a 0/1 sequence where consecutive correct answers score an increasing running count.Easy2ArraySimulation+1No attempts yet1s128 MBJudgeable
Card GameSimulate 10 rounds of card comparisons between two players, scoring points, and determine the overall winner using the most recent non-tied round as a tiebreaker.Easy2SimulationArrayNo attempts yet1s128 MBJudgeable
AI Oven ClockGiven a start time in hours, minutes, seconds and a duration in seconds, compute the finishing time on a 24-hour clock that wraps around.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Candy Teacher Go ChangyoungCheck whether the total number of candies among N students can be evenly divided among them (sum divisible by N).Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Maximum ValueGiven a 9x9 grid of numbers, find the maximum value and print its row and column position.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
Digit Counts in a ProductGiven three 3-digit natural numbers, compute their product and count how many times each digit 0 to 9 appears in it.Easy2MathImplementationNo attempts yet1s128 MBJudgeable
Average and ModeGiven ten natural numbers, compute and print their average and the most frequently occurring value.Easy2ArrayImplementationNo attempts yet1s128 MBJudgeable
VirusCount how many computers other than computer 1 lie in computer 1's connected component of a small undirected graph.Easy2GraphBFS+1No attempts yet1s128 MBJudgeable
Greatest Common Divisor and Least Common MultipleGiven two natural numbers up to 10000, output their greatest common divisor and least common multiple.Easy2MathNumber theoryNo attempts yet1s128 MBJudgeable
Coin GameCount occurrences of each of 8 possible length-3 head/tail patterns among all consecutive triples in a 40-character coin toss string, for multiple test cases.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
Third Largest NumberFor each test case of 10 positive integers, output the third largest distinct-position value in the array.Easy2SortingArrayNo attempts yet1s32 MBJudgeable
CryptoquoteDecode each ciphertext message by substituting letters using a given 26-letter mapping while preserving spaces.Easy2StringImplementationNo attempts yet1s128 MBJudgeable
U.S. Unit ConversionConvert given values between kilograms/pounds and liters/gallons using fixed conversion factors, rounding to four decimal places.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Laundry Owner DonghyukGiven a number of cents, output the minimum count of quarters, dimes, nickels, and pennies using a greedy coin breakdown.Easy2GreedyMath+1No attempts yet1s128 MBJudgeable
Binary AdditionAdd two binary strings up to length 80 for multiple test cases and print the sum without leading zeros.Easy2StringSimulation+1No attempts yet1s128 MBJudgeable
Matrix MultiplicationRead two matrices of bounded size and print their standard matrix product.Easy2MatrixImplementationNo attempts yet1s128 MBJudgeable
Base ConversionConvert a number given in an arbitrary base (2 to 36, using letters for digits above 9) into its decimal value.Easy2MathImplementation+1No attempts yet1s128 MBJudgeable
Fibonacci Number 2Compute the nth Fibonacci number for n up to 90.Easy2Dynamic programmingMathNo attempts yet1s128 MBJudgeable
What Is This Semester's GPA?Compute a weighted GPA from a list of courses, credits, and letter grades, rounded to two decimal places.Easy2ImplementationMathNo attempts yet1s128 MBJudgeable
Triangular Gimbap Price ComparisonGiven several price rates for gimbap, compute the cheapest cost to buy exactly 1000 grams using the best per-gram rate among all stores.Easy2MathGreedy+1No attempts yet1s128 MBJudgeable
Score CalculationGiven 8 distinct problem scores, output the sum of the top 5 and their original indices in increasing order.Easy2SortingArray+1No attempts yet1s128 MBJudgeable
Sugar DeliveryFind the minimum number of 3kg and 5kg bags that sum to exactly N kilograms, or -1 if impossible.Easy2GreedyMathNo attempts yet1s128 MBJudgeable