Challenges
Python problems with tests, from your first function to contest-level algorithms, each with a timer, stars and a duel mode.
Beginner0/179
Intermediate0/197
Advanced0/167
Expert0/99
No streak yet
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
- ✓
0 of 1926 stars
Today's challenge
Race a friend
Same challenge, live or when you both can. The winner takes the prize pool, up to 580 XP.
This week's board
Study plans
Topics
All challenges
Status#TitleTopicLevelXPYour bestSave
- 11.Hello WorldThe first program everyone writesBeginner Python Basics · 25 XPPython BasicsBeginner25
- 33.Simple MathA tiny calculator for two numbersBeginner Python Basics · 25 XPPython BasicsBeginner25
- 55.Maximum of TwoPick the bigger of two numbersBeginner Python Basics · 30 XPPython BasicsBeginner30
- 66.Absolute ValueHow far is a number from zero?Beginner Python Basics · 35 XPPython BasicsBeginner35
- 88.Default ParametersA greeting that works with or without a nameBeginner Functions · 35 XPFunctionsBeginner35
- 1515.Multiply All ArgumentsMultiply however many numbers you are givenIntermediate Functions · 55 XPFunctionsIntermediate55
- 1717.Palindrome CheckDoes it read the same backwards?Intermediate Strings · 60 XPStringsIntermediate60
- 1919.Custom FilterKeep only the items that pass a testIntermediate Functions · 65 XPFunctionsIntermediate65
- 2121.Fibonacci SequenceThe sequence where each number adds the two beforeIntermediate Loops · 70 XPLoopsIntermediate70
- 2222.FizzBuzzFizz, Buzz or a number: the classic counting gameIntermediate Loops · 75 XPLoopsIntermediate75
- 2323.Prime Number CheckIs this number divisible only by 1 and itself?Intermediate Loops · 80 XPLoopsIntermediate80
- 2525.Memoization DecoratorTeach a slow function to remember its answersAdvanced Functions · 100 XPFunctionsAdvanced100
- 2626.Flatten One LevelBoxes inside a box: tip them all out onto the tableBeginner Lists · 25 XPListsBeginner25
- 2727.Coins at the TillHand back change using as few coins as possibleBeginner Greedy · 30 XPGreedyBeginner30
- 2828.Count the VotesThe polls have closed: time to count every ballotBeginner Dictionaries and sets · 30 XPDictionaries and setsBeginner30
- 3030.Missing LettersWhich letters of the alphabet never show up in this sentence?Beginner Strings · 30 XPStringsBeginner30
- 3131.Power of TwoIs this number made by doubling 1 again and again?Beginner Bit manipulation · 30 XPBit manipulationBeginner30
- 3232.Raise to a PowerRepeated multiplication, built without the shortcutBeginner Recursion and backtracking · 30 XPRecursion and backtrackingBeginner30
- 3333.Reverse the Word OrderRead a sentence back to front, one whole word at a timeBeginner Strings · 30 XPStringsBeginner30
- 3434.Caesar CipherSlide every letter along the alphabet to hide a messageBeginner Strings · 35 XPStringsBeginner35
- 3535.Clock Time to SecondsHow many seconds long is a video that runs 1:02:03?Beginner Parsing · 35 XPParsingBeginner35
- 3636.Endless FibonacciA sequence that never runs out, served one number at a timeBeginner Iterators and generators · 35 XPIterators and generatorsBeginner35
- 3838.Move Zeros to the EndSweep every zero to the back of the lineBeginner Two pointers · 35 XPTwo pointersBeginner35
- 3939.The Missing NumberEvery number from zero upwards is here, except oneBeginner Lists · 35 XPListsBeginner35
- 4040.Best K Days in a RowA shop's best stretch of consecutive daysBeginner Sliding window · 40 XPSliding windowBeginner40
- 4141.Climbing StairsHow many different ways can you walk up a staircase?Beginner Dynamic programming · 40 XPDynamic programmingBeginner40
- 4242.First One of a KindIn a crowd of repeats, who showed up only once?Beginner Dictionaries and sets · 40 XPDictionaries and setsBeginner40
- 4343.Hot PotatoPass it around the circle: who is the last one standing?Beginner Stacks and queues · 40 XPStacks and queuesBeginner40
- 4444.Merge Two Sorted ListsZip two sorted lines of numbers into oneBeginner Two pointers · 40 XPTwo pointersBeginner40
- 4646.Robot on a GridFollow the commands and find out where the little robot ends upBeginner Simulation · 40 XPSimulationBeginner40
- 4747.Sum of a Nested ListLists inside lists inside lists: what do all the numbers add up to?Beginner Recursion and backtracking · 40 XPRecursion and backtrackingBeginner40
- 4848.Balanced BracketsDoes every bracket close in the right order?Beginner Stacks and queues · 45 XPStacks and queuesBeginner45
- 4949.Bank Account With OverdraftKeep the money right, even when the balance dips below zeroBeginner Classes · 45 XPClassesBeginner45
- 5050.Binary SearchWhere does this number sit in a long sorted list?Beginner Sorting and searching · 45 XPSorting and searchingBeginner45
- 5151.Change at the Ticket BoothCan the booth give every customer the right change?Beginner Greedy · 45 XPGreedyBeginner45
- 5353.Longest Common PrefixThe longest beginning that every word in the list agrees onIntermediate Strings · 55 XPStringsIntermediate55
- 5454.Mirror a TreeFlip a tree as if it stood in front of a mirrorIntermediate Trees · 55 XPTreesIntermediate55
- 5555.Rotate a ListSpin the list around without losing anyoneIntermediate Lists · 55 XPListsIntermediate55
- 5656.Compare Version NumbersIs version 1.10 newer than 1.9? Every software update has to knowIntermediate Parsing · 60 XPParsingIntermediate60
- 5757.Compress Repeated LettersSqueeze runs of repeated letters, but only when it saves spaceIntermediate Strings · 60 XPStringsIntermediate60
- 5858.Cookies for ChildrenMake as many children happy as the cookie jar allowsIntermediate Greedy · 60 XPGreedyIntermediate60
- 5959.Gray Code SequenceCount through every binary number, flipping only one bit at a timeIntermediate Bit manipulation · 60 XPBit manipulationIntermediate60
- 6060.Integer Square RootSquare roots of enormous numbers, exact to the last digitIntermediate Sorting and searching · 60 XPSorting and searchingIntermediate60
- 6161.One-Way StreetsCan you drive to your destination without going the wrong way?Intermediate Graphs · 60 XPGraphsIntermediate60
- 6262.Pair Sum in a Sorted ListTwo prices that use up the budget exactlyIntermediate Two pointers · 60 XPTwo pointersIntermediate60
- 6363.Queue From Two StacksFirst in, first out, built from two last-in-first-out pilesIntermediate Stacks and queues · 60 XPStacks and queuesIntermediate60
- 6464.Repeats Close TogetherHas anything come back too soon?Intermediate Dictionaries and sets · 60 XPDictionaries and setsIntermediate60
- 6565.Roman Numerals to IntegerWhat number is MCMXCIV hiding?Intermediate Strings · 60 XPStringsIntermediate60
- 6666.Root-to-Leaf Path SumIs there a way down the tree that adds up exactly?Intermediate Trees · 60 XPTreesIntermediate60
- 6767.Hit CounterHow many visits did the site get in the last five minutes?Intermediate Classes · 65 XPClassesIntermediate65
- 6868.Integer to Roman NumeralsWrite any year the way the Romans carved it in stoneIntermediate Strings · 65 XPStringsIntermediate65
- 6969.Jump to the EndIs the last stepping stone within reach?Intermediate Greedy · 65 XPGreedyIntermediate65
- 7070.Level Order TraversalRead a tree one floor at a timeIntermediate Trees · 65 XPTreesIntermediate65
- 7171.Maximum Subarray SumThe best unbroken run in a list of ups and downsIntermediate Dynamic programming · 65 XPDynamic programmingIntermediate65
- 7272.Primes Up to NEvery prime number, all the way up to a limitIntermediate Math · 65 XPMathIntermediate65
- 7373.Reverse Polish CalculatorArithmetic with no brackets, where the operator comes lastIntermediate Stacks and queues · 65 XPStacks and queuesIntermediate65
- 7474.Reverse the BitsRead a 32-bit number in the mirrorIntermediate Bit manipulation · 65 XPBit manipulationIntermediate65
- 7575.Sort by FrequencyLine up a list by how often each value turns upIntermediate Sorting and searching · 65 XPSorting and searchingIntermediate65
- 7676.Tidy a File PathUntangle a folder path full of dots and extra slashesIntermediate Stacks and queues · 65 XPStacks and queuesIntermediate65
- 7777.Two SumSomewhere in the list, two numbers make the targetIntermediate Dictionaries and sets · 65 XPDictionaries and setsIntermediate65
- 7878.Common to Every ListWhat do all the shopping lists have in common?Intermediate Lists · 70 XPListsIntermediate70
- 7979.Count the IslandsHow many separate islands are on this map?Intermediate Graphs · 70 XPGraphsIntermediate70
- 8080.Flatten a Nested DictionarySquash layers of nested settings into a single levelIntermediate Recursion and backtracking · 70 XPRecursion and backtrackingIntermediate70
- 8181.Friend GroupsHow many separate circles of friends are there?Intermediate Graphs · 70 XPGraphsIntermediate70
- 8282.House RobberThe most loot from a street without setting off an alarmIntermediate Dynamic programming · 70 XPDynamic programmingIntermediate70
- 8383.K-th Largest ItemWho came in k-th place on an unsorted scoreboard?Intermediate Sorting and searching · 70 XPSorting and searchingIntermediate70
- 8484.Spiral Walk Through a MatrixWalk around the edges and work your way into the middleIntermediate Simulation · 70 XPSimulationIntermediate70
- 8585.Stack With a MinimumA stack that always knows its smallest itemIntermediate Stacks and queues · 70 XPStacks and queuesIntermediate70
- 8686.Tower of HanoiMove a stack of discs, one at a time, never big on smallIntermediate Recursion and backtracking · 70 XPRecursion and backtrackingIntermediate70
- 8787.Trailing Zeros of a FactorialHow many zeros sit at the end of a gigantic number?Intermediate Math · 70 XPMathIntermediate70
- 8888.Convert Between BasesTranslate a number from one counting system to anotherIntermediate Math · 75 XPMathIntermediate75
- 8989.First and Last PositionWhere does a run of repeated values start and stop?Intermediate Sorting and searching · 75 XPSorting and searchingIntermediate75
- 9090.Grid Paths with WallsCount the routes across a grid when some squares are blockedIntermediate Dynamic programming · 75 XPDynamic programmingIntermediate75
- 9191.Group the AnagramsSame letters, different words: sort them into familiesIntermediate Dictionaries and sets · 75 XPDictionaries and setsIntermediate75
- 9292.Interleave StreamsDeal items from several sources like cards around a tableIntermediate Iterators and generators · 75 XPIterators and generatorsIntermediate75
- 9393.Most Meetings in One RoomSqueeze as many bookings as possible into one meeting roomIntermediate Greedy · 75 XPGreedyIntermediate75
- 9494.Rail Fence CipherZigzag a secret message across rails, then read it off row by rowIntermediate Strings · 75 XPStringsIntermediate75
- 9595.Right Side ViewWhat do you see standing to the right of a tree?Intermediate Trees · 75 XPTreesIntermediate75
- 9696.Ring BufferA fixed-size queue that recycles its oldest slotIntermediate Stacks and queues · 75 XPStacks and queuesIntermediate75
- 9797.Rotate the GridTurn a square picture a quarter turn to the rightIntermediate Lists · 75 XPListsIntermediate75
- 9898.Folder SizesHow much space does each folder really take up?Intermediate Trees · 80 XPTreesIntermediate80
- 9999.Game of Life: One StepCells are born, survive or die, all at the same instantIntermediate Simulation · 80 XPSimulationIntermediate80
- 100100.Longest Substring Without RepeatsThe longest stretch of text where nothing repeatsIntermediate Sliding window · 80 XPSliding windowIntermediate80