Curated sets
Interview warm-up
Short whiteboard tasks to get the rust off.
Total results2,493 problems
| Topics | Judge | |||||
|---|---|---|---|---|---|---|
| ResistanceGiven three color names, map each to its digit or multiplier using a fixed table and print the resulting resistance value. | Easy1 | Hash mapImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Escape from a RectangleGiven a point inside an axis-aligned rectangle, compute the minimum distance from the point to the nearest side of the rectangle. | Easy1 | MathGeometry+1 | No attempts yet | 2s | 128 MB | Judgeable |
| Counting VowelsFor each input line until a terminating '#', count how many letters are vowels regardless of case. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Rugby ClubRead repeated name/age/weight lines until a sentinel and print whether each member is Senior or Junior based on simple thresholds. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Cutting ChocolateCompute the minimum number of straight cuts needed to divide an N by M chocolate bar into all 1x1 pieces. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Print Stars - 3Print N lines of stars where the count decreases from N down to 1. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Oven ClockGiven a start time and a number of minutes to cook, compute and print the finishing time on a 24-hour clock. | Easy1 | MathSimulation | No attempts yet | 1s | 128 MB | Judgeable |
| Average and MedianRead five natural numbers and print their average and median. | Easy1 | SortingArray+1 | No attempts yet | 1s | 128 MB | Judgeable |
| MultiplicationGiven two three-digit numbers, print the partial products from vertical multiplication and their total. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| String RepetitionGiven repeat count R and string S, output the string formed by repeating each character of S exactly R times in order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Least Common Multiple and Greatest Common DivisorFor multiple integer pairs, compute and print each pair's least common multiple and greatest common divisor. | Easy1 | MathNumber theory | No attempts yet | 1s | 128 MB | Judgeable |
| Typo Man Go ChangyoungGiven a string and a 1-based position, output the string with that one character removed, for multiple test cases. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Multiplication TablePrint the multiplication table for a given integer N from N*1 to N*9 in the exact required format. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Fibonacci NumberCompute the nth Fibonacci number for n up to 45. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Leap YearGiven a year, output 1 if it is a leap year according to the standard divisibility rule, otherwise output 0. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| After the PartyCompute actual attendees as L times P, then output the difference between each of five reported counts and that value. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| FBIGiven five agent codes, print the 1-based positions of those containing the substring FBI, or a fixed message if none do. | Easy1 | StringImplementation | No attempts yet | 0.25s | 128 MB | Judgeable |
| Alarm ClockGiven an alarm time in hours and minutes, compute and print the time 45 minutes earlier, wrapping around midnight if needed. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| SangsuReverse two given three-digit numbers digit by digit and print the larger reversed value. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Completing a Chess SetGiven counts of six white chess piece types, output how many of each must be added or removed to reach a complete 16-piece set. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ABCSort three distinct numbers into A, B, C and print them in an order given by a 3-letter permutation string. | Easy1 | SortingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| The Good and the BadCount the letters g and b in each hero name, ignoring case, and print whether the name is GOOD, A BADDY, or NEUTRAL. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Line NumbersRead N lines of text and print each one prefixed with its 1-based line number in the format "number. content". | Easy1 | ImplementationString | No attempts yet | 1s | 128 MB | Judgeable |
| Mirror, Oh! MirrorRead lines of ASCII text until a line of three asterisks, and print each line with its characters reversed. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Spinner Lock SimulationGiven the starting digits of a spinner lock and a sequence of button labels, add each label's digits to the wheels modulo 10 and print the final readout. | Easy1 | SimulationImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| TGN Advertising DecisionFor each test case, compare the no-ad revenue r against e minus c, then print advertise, do not advertise, or does not matter. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Triangle and Its Three SidesRead triples of positive integers until 0 0 0, and for each print Equilateral, Isosceles, Scalene, or Invalid based on equal sides and the triangle inequality. | Easy1 | ImplementationMath+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Divisors and MultiplesFor each pair of numbers, print factor if the first divides the second, multiple if the first is a multiple of the second, or neither. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Even Sum Versus Odd SumFor each of up to 50 sequences, add the even numbers and the odd numbers separately and print EVEN, ODD, or TIE based on which sum is larger. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| BillingRead item names until EOI and print the total cost of all listed supplies with a dollar sign and two decimals. | Easy1 | Hash mapImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Battle Droid PriceFor each test case, multiply five part quantities by fixed prices, sum them, and print the total with a dollar sign and two decimals. | Easy1 | MathImplementation+2 | No attempts yet | 1s | 128 MB | Judgeable |
| Entry Log ManagementRead N names and print each one converted to lowercase, one per line. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| The Errand RouteAdd four travel times given in seconds and print the total split into minutes on the first line and seconds on the second. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| ReceiptGiven the total price of 10 books and the prices of 9 of them, find the missing book's price. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| JOI and IOICount how many length-3 windows of a string equal JOI and how many equal IOI, including overlaps. | Easy1 | StringBrute force+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Exam ScoresGiven the four subject scores of two students, print the larger of the two totals, or Minguk's total when they tie. | Easy1 | ImplementationMath | No attempts yet | 1s | 128 MB | Judgeable |
| Find the Students Who Didn't SubmitGiven 28 distinct attendance numbers from 1 to 30, print the two missing numbers in increasing order. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Do-it, Do-it-NotFor each test case, compare the two middle digits of an even-length binary string and print Do-it if they match, otherwise Do-it-Not. | Easy1 | StringImplementation+1 | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse TextRead each test case line and print its characters in reverse order. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Sounds fishy!Read four depth readings and print Fish Rising, Fish Diving, Fish At Constant Depth, or No Fish based on their ordering. | Easy1 | ImplementationArray | No attempts yet | 2s | 512 MB | Judgeable |
| Which Alien?Given the number of antennae and eyes a witness saw, print the names of all alien species whose ranges match, in the order given. | Easy1 | ImplementationBrute force+1 | No attempts yet | 2s | 512 MB | Judgeable |
| Multiple ChoiceRead a student's N answers followed by the N correct answers, and count how many positions match. | Easy1 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| AlienGiven a point and n axis-aligned rectangles, decide whether any rectangle contains the point, boundaries included. | Easy1 | GeometryImplementation+2 | No attempts yet | 2s | 128 MB | Judgeable |
| FactorialRead n and print the ones digit of n factorial. | Easy1 | MathImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| LifeguardThe task is to count children farther than k meters from the lifeguard position. | Easy1 | GeometryMath | No attempts yet | 1s | 512 MB | Judgeable |
| Letter CounterCount how many times each letter appears across the given lines and print nonzero counts from a to z then A to Z. | Easy1 | ArrayString | No attempts yet | 1s | 512 MB | Judgeable |
| Long TapeChoose a nonempty contiguous segment of the given sequence so its arithmetic mean is as small as possible. | Easy1 | Array | No attempts yet | 1s | 128 MB | Judgeable |
| FiguresCheck whether any three consecutive figures contain one circle, one square, and one triangle. | Easy1 | Sliding windowArray | No attempts yet | 1s | 128 MB | Judgeable |
| WężykPrint the numbers 1 to n squared in n rows that alternate between left-to-right and right-to-left order. | Easy1 | SimulationMatrix | No attempts yet | 1s | 128 MB | Judgeable |
| Flipping CoinsCount the heads and tails and flip the coins on the less frequent side so all coins show the same face. | Easy1 | GreedyArray | No attempts yet | 1s | 128 MB | Judgeable |
| Caesar CipherGiven the encrypted message and its original first letter, recover the shift and decode the full message. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| StrollGiven a walk of N, S, E and W steps on a grid, compute the Manhattan distance from the endpoint back to the start. | Easy1 | SimulationMath | No attempts yet | 2s | 128 MB | Judgeable |
| Letter BankDecide whether the second word uses exactly the letters of the first word, each at least once. | Easy1 | Hash mapString | No attempts yet | 1s | 128 MB | Judgeable |
| First and Last LetterPrint the first and last letter of each given uppercase string, doubling the letter for length 1. | Easy1 | String | No attempts yet | 1s | 128 MB | Judgeable |
| Reverse Each WordFor each of T sentences, print the words in the same order with the letters inside every word reversed. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Kkung's Space TripCount the ships that reach the destination by checking whether each ship's fuel covers its burn rate over the travel time. | Easy1 | MathImplementation | No attempts yet | 2s | 128 MB | Judgeable |
| Fraud BustersMatch each 9-character database code against the scanned code, treating every star as a wildcard, and print the matches in input order. | Easy1 | String matchingImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Balloon ColorsCheck whether the first color differs from X and the last color differs from Y, then print BOTH, EASY, HARD, or OKAY. | Easy1 | Implementation | No attempts yet | 1s | 128 MB | Judgeable |
| Birthday StatisticsCount how many of the n employees were born in each month and print the twelve monthly totals. | Easy1 | ArrayImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Encoding Binary NumbersEncode each binary string as run lengths followed by digits and print the result per line. | Easy1 | StringImplementation | No attempts yet | 1s | 128 MB | Judgeable |
| Christmas Gift DrawGiven the gift each guest drew, print for every guest who received the gift they brought. | Easy1 | Array | No attempts yet | 2s | 512 MB | Judgeable |
| GiftCount the days on which the recorded time is at least k milliseconds faster than the previous day. | Easy1 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Morton NumbersRead integers x and y and print their Morton number, built by interleaving the bits of x and y. | Easy1 | Bit manipulation | No attempts yet | 2s | 512 MB | Judgeable |
| Gray codeConvert an n-bit binary string to its standard Gray code by copying the first bit and adding each adjacent pair of bits without carry. | Easy1 | Bit manipulationString | No attempts yet | 1s | 128 MB | Judgeable |
| Ship SelectionCount the ships whose fuel covers consumption times the integer-division travel time for the given distance. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| AcronymsGiven an acronym and candidate phrases, print the phrases whose word initials match the acronym letters in order. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Longest Run of X'sCount the longest run of consecutive X marks in each hallway and print its length in the required sentence. | Easy1 | Array | No attempts yet | 1s | 256 MB | Judgeable |
| Count VowelsCount the vowels a, e, i, o, and u in each given lowercase word and print the result in the required sentence. | Easy1 | String | No attempts yet | 1s | 256 MB | Judgeable |
| Golden Khon KaenCount how many times the word GOLDEN can be formed from each given string of capital letters. | Easy1 | Hash map | No attempts yet | 10s | 64 MB | Judgeable |
| ServerCount how many jobs from the front finish in request order before their total duration exceeds T. | Easy1 | Prefix sumSimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Subin and the SequenceGiven the prefix averages of a sequence, recover the original sequence term by term. | Easy1 | Prefix sumMath | No attempts yet | 1s | 32 MB | Judgeable |
| Mosquito TrapFind the smallest area of an axis-aligned square that covers all given points on the table. | Easy1 | Geometry | No attempts yet | 1s | 32 MB | Judgeable |
| Keystrokes per FingerCount how many times each of the eight fingers presses a key when the given string is typed on the fixed US layout. | Easy1 | ImplementationArray | No attempts yet | 1s | 32 MB | Judgeable |
| Christmas PartyTally each friend's score over M guessing games from the targets and the written names. | Easy1 | Implementation | No attempts yet | 1s | 256 MB | Judgeable |
| Vertical ReadingRead five given words column by column from top to bottom, skipping missing letters in shorter words, and print the letters in that order. | Easy1 | SimulationArray+1 | No attempts yet | 1s | 256 MB | Judgeable |
| Reversing Card SegmentsReverse ten given segments of a 20-card row that starts in order and print the final arrangement. | Easy1 | ArraySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| Count ValueCount how many times the integer v appears among the N given integers. | Easy1 | Array | No attempts yet | 1s | 256 MB | Judgeable |
| Find the AlphabetGiven a lowercase word of length at most 100, output the 0-based first index of each letter a to z, or -1 when absent. | Easy1 | ArrayString | No attempts yet | 1s | 256 MB | Judgeable |
| Insert BallsFill N baskets by writing ball number k into baskets i through j for each operation, then print all baskets. | Easy1 | ArraySimulation | No attempts yet | 1s | 256 MB | Judgeable |
| The nth Fibonacci NumberGiven n up to 20, compute the nth Fibonacci number defined from 0 and 1. | Easy1 | Dynamic programmingRecursion | No attempts yet | 1s | 256 MB | Judgeable |
| N-orthotopeGiven two axis-aligned boxes in N dimensions, print the dimension of their overlap, or -1 when they do not meet. | Easy1 | ImplementationGeometry | No attempts yet | 1s | 256 MB | Judgeable |
| Palindrome CheckCheck whether the given lowercase word reads the same forward and backward and print 1 or 0. | Easy1 | StringTwo pointers | No attempts yet | 1s | 256 MB | Judgeable |
| Use Every LetterDecide for each of up to 50 sentences whether it contains every letter a to z, and list the missing letters otherwise. | Easy1 | StringArray | No attempts yet | 2s | 256 MB | Judgeable |
| Communication ChannelsCompare each transmitted binary string with its received copy and print OK when they match and ERROR otherwise. | Easy1 | StringImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Balancing WeightsYou sum the signed positions of the weights and report whether the lever tips left, tips right, or stays balanced. | Easy1 | ImplementationMath | No attempts yet | 1s | 256 MB | Judgeable |
| Logical Functions: AND and ORCheck each submitted weight and bias by testing all four binary inputs and report whether the neuron matches the requested AND or OR gate. | Easy1 | SimulationImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| Affine CipherApply E(X) = (aX + b) mod 26 to each uppercase letter of the plaintext and print the ciphertext. | Easy1 | ImplementationString+1 | No attempts yet | 5s | 256 MB | Judgeable |
| The Princess and the Magic MirrorPrint an N by N picture unchanged, mirrored left to right, or flipped top to bottom according to the given mood number. | Easy1 | MatrixImplementation | No attempts yet | 2s | 256 MB | Judgeable |
| PersistenceCount how many times multiplying the decimal digits together reduces the given number to a single digit. | Easy1 | SimulationImplementation | No attempts yet | 1s | 256 MB | Judgeable |
| Box intersection volumeCompute the volume shared by N axis-aligned boxes by intersecting their x, y, and z ranges. | Easy1 | Math | No attempts yet | 1s | 256 MB | Judgeable |
| CardsTwo cards are compared at a time with the smaller pocketed, so find the largest possible sum of pocketed numbers for the given row. | Easy1 | Array | No attempts yet | 1s | 32 MB | Judgeable |
| Power of TwoPrint 1 if the given natural number N is a power of two and 0 otherwise. | Easy1 | Bit manipulation | No attempts yet | 2s | 512 MB | Judgeable |
| Magic TrickFind the card shared by the chosen rows of two 4 by 4 layouts, or report a bad layout or cheating. | Easy1 | ArrayImplementation | No attempts yet | 5s | 512 MB | Judgeable |
| George BooleRead one boolean operation in the form true AND false and print its result. | Easy1 | ImplementationString+2 | No attempts yet | 2s | 512 MB | Judgeable |
| Hamming DistanceRead two n-dimensional integer vectors and count the positions where their entries differ. | Easy1 | ImplementationArray | No attempts yet | 1s | 256 MB | Judgeable |
| Grass Seed Inc.Given the cost per square metre and a list of rectangular lawns, print the total cost of seeding all of them, rounded to seven decimals. | Easy1 | MathImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| HandballGiven each player's goal counts across M matches, count how many players scored at least once in every match. | Easy1 | ArrayImplementation | No attempts yet | 2s | 512 MB | Judgeable |
| Zero or OneGiven three bits picked by three players, print the player whose bit differs from the other two, or * if there is no such player. | Easy1 | ImplementationBrute force | No attempts yet | 1s | 512 MB | Judgeable |
| The Y Bus Goes VroomSimulate the passenger count as a bus travels N stops with given boarding and alighting numbers, then print the driver's fixed name. | Easy1 | SimulationImplementation+1 | No attempts yet | 2s | 256 MB | Judgeable |
| Pick the QuadrantRead the x and y coordinates of a nonzero point and print which of the four quadrants it lies in. | Easy1 | ImplementationMath | No attempts yet | 1s | 512 MB | Judgeable |