360 Python practice problems in one clear learning order
Build Python skill through scenario-based exercises instead of random questions. The roadmap starts with input and output, then progresses through functions, OOP, data structures, algorithms and technical interview patterns.
Choose a Python topic
Follow the numbered order if you are new to coding, or open the topic you need to revise.
Practice by topic and difficulty
The first five pages include readable problem details and solutions. Premium pages explain the skill being tested before asking you to unlock the complete workspace.
Python Fundamentals and Input/Output
Start here. Practice input(), print(), variables, numbers, formatting, and small formulas.
- #001Echo a message: Coding club announcementStarterFree preview
- #002Echo a message: Preserve punctuationStarterFree preview
- #003Create a personal greeting: Welcome a learnerStarterFree preview
- #004Create a personal greeting: Name with spacesStarterFree preview
- #005Add two integers: Add two cart quantitiesStarterFree preview
- #006Add two integers: Handle a negative adjustmentStarterPremium
- #007Show basic arithmetic: Compare two measurementsStarterPremium
- #008Show basic arithmetic: Use a negative first valueStarterPremium
- #009Rectangle measurements: Floor matStarterPremium
- #010Rectangle measurements: Decimal dimensionsStarterPremium
- #011Convert Celsius to Fahrenheit: Weather displayStarterPremium
- #012Convert Celsius to Fahrenheit: Freezing referenceStarterPremium
- #013Calculate a purchase total: Notebook orderStarterPremium
- #014Calculate a purchase total: Single premium itemStarterPremium
- #015Convert seconds to clock time: Video durationStarterPremium
- #016Convert seconds to clock time: Short timerStarterPremium
- #017Swap two values: Swap seat labelsStarterPremium
- #018Swap two values: Swap signed readingsStarterPremium
- #019Average three scores: Quiz averageStarterPremium
- #020Average three scores: Scores with decimalsStarterPremium
Operators and Decision Making
Translate everyday rules into comparisons, Boolean expressions, and if/elif/else branches.
- #021Classify even or odd: Locker assignmentBeginnerPremium
- #022Classify even or odd: Negative integerBeginnerPremium
- #023Classify a number's sign: Profit indicatorBeginnerPremium
- #024Classify a number's sign: Break-even dayBeginnerPremium
- #025Find the larger of two values: Compare two bidsBeginnerPremium
- #026Find the larger of two values: Equal readingsBeginnerPremium
- #027Find the largest of three values: Highest test scoreBeginnerPremium
- #028Find the largest of three values: All negative temperaturesBeginnerPremium
- #029Detect a leap year: Modern leap yearBeginnerPremium
- #030Detect a leap year: Century exceptionBeginnerPremium
- #031Convert a score to a grade: Passing gradeBeginnerPremium
- #032Convert a score to a grade: Reject bad dataBeginnerPremium
- #033Set an age-based ticket price: Child visitorBeginnerPremium
- #034Set an age-based ticket price: Senior visitorBeginnerPremium
- #035Validate and classify a triangle: Equal-sided frameBeginnerPremium
- #036Validate and classify a triangle: Impossible frameBeginnerPremium
- #037Check a basic password policy: Accepted signupBeginnerPremium
- #038Check a basic password policy: Missing digitBeginnerPremium
- #039Calculate a shipping fee: Large guest orderBeginnerPremium
- #040Calculate a shipping fee: Small member orderBeginnerPremium
Loops and Number Problems
Build loop confidence with counters, accumulators, digit logic, primes, and classic sequences.
- #041Sum the first n integers: Weekly countersBeginnerPremium
- #042Sum the first n integers: Empty rangeBeginnerPremium
- #043Calculate a factorial: Arrangement countBeginnerPremium
- #044Calculate a factorial: Zero factorialBeginnerPremium
- #045Print a multiplication table: Practice tableBeginnerPremium
- #046Print a multiplication table: Negative tableBeginnerPremium
- #047Count digits in an integer: Large invoice numberBeginnerPremium
- #048Count digits in an integer: Signed single digitBeginnerPremium
- #049Reverse an integer: Reverse an access codeBeginnerPremium
- #050Reverse an integer: Negative value with zerosBeginnerPremium
- #051Check a numeric palindrome: Symmetric codeBeginnerPremium
- #052Check a numeric palindrome: Ordinary numberBeginnerPremium
- #053Test primality: Prime identifierBeginnerPremium
- #054Test primality: Small edge caseBeginnerPremium
- #055List primes up to n: Small prime catalogBeginnerPremium
- #056List primes up to n: Boundary primeBeginnerPremium
- #057Generate Fibonacci terms: Ten-term sequenceBeginnerPremium
- #058Generate Fibonacci terms: Single-term edge caseBeginnerPremium
- #059Find GCD and LCM: Align maintenance cyclesBeginnerPremium
- #060Find GCD and LCM: Coprime valuesBeginnerPremium
String Processing
Learn normalization, slicing, counting, searching, and transformation of real text.
- #061Reverse text: Reverse a labelBeginnerPremium
- #062Reverse text: Keep spacesBeginnerPremium
- #063Check a phrase palindrome: Classic phraseBeginnerPremium
- #064Check a phrase palindrome: Punctuation and caseBeginnerPremium
- #065Count vowels and consonants: Course nameBeginnerPremium
- #066Count vowels and consonants: Ignore digits and punctuationBeginnerPremium
- #067Count words: Short sentenceBeginnerPremium
- #068Count words: Extra spacingBeginnerPremium
- #069Count a chosen character: Count a letterBeginnerPremium
- #070Count a chosen character: Case-sensitive countBeginnerPremium
- #071Remove duplicate characters: Compress repeated lettersBeginnerPremium
- #072Remove duplicate characters: Spaces are charactersBeginnerPremium
- #073Check for anagrams: Simple anagramBeginnerPremium
- #074Check for anagrams: Phrase anagramBeginnerPremium
- #075Find the first nonrepeating character: Unique letter existsBeginnerPremium
- #076Find the first nonrepeating character: No unique letterBeginnerPremium
- #077Run-length encode text: Repeated groupsBeginnerPremium
- #078Run-length encode text: No repeated neighborsBeginnerPremium
- #079Find the longest word: Course descriptionBeginnerPremium
- #080Find the longest word: Tie behaviorBeginnerPremium
Lists, Tuples, and Matrices
Use sequence operations and common array patterns, then move into matrix processing.
- #081Calculate list sum and average: Daily salesBeginnerPremium
- #082Calculate list sum and average: Decimal measurementsBeginnerPremium
- #083Find largest and second largest: Contest scoresBeginnerPremium
- #084Find largest and second largest: Negative valuesBeginnerPremium
- #085Remove list duplicates in order: Clean survey codesBeginnerPremium
- #086Remove list duplicates in order: Already uniqueBeginnerPremium
- #087Rotate a list to the right: Shift duty rosterBeginnerPremium
- #088Rotate a list to the right: Rotation larger than lengthBeginnerPremium
- #089Move zeros to the end: Clean sparse readingsBeginnerPremium
- #090Move zeros to the end: No zerosBeginnerPremium
- #091Merge two sorted lists: Merge rank listsBeginnerPremium
- #092Merge two sorted lists: Duplicates across listsBeginnerPremium
- #093Find a missing number: Missing attendance IDBeginnerPremium
- #094Find a missing number: Missing boundaryBeginnerPremium
- #095Find two-sum indexes: Price pairBeginnerPremium
- #096Find two-sum indexes: Pair containing a negativeBeginnerPremium
- #097Find the maximum subarray sum: Best profit streakBeginnerPremium
- #098Find the maximum subarray sum: All lossesBeginnerPremium
- #099Transpose a matrix: Rectangular tableBeginnerPremium
- #100Transpose a matrix: Single rowBeginnerPremium
Sets and Dictionaries
Choose sets for membership and dictionaries for relationships, grouping, and frequency tables.
- #101Calculate set union and intersection: Shared course IDsIntermediatePremium
- #102Calculate set union and intersection: Disjoint choicesIntermediatePremium
- #103Count unique words: Repeated topic wordsIntermediatePremium
- #104Count unique words: All repeatedIntermediatePremium
- #105Build a word-frequency table: Analyze feedbackIntermediatePremium
- #106Build a word-frequency table: Single vocabulary itemIntermediatePremium
- #107Calculate a student's average: Three assessmentsIntermediatePremium
- #108Calculate a student's average: Decimal resultsIntermediatePremium
- #109Update inventory: Deliveries and salesIntermediatePremium
- #110Update inventory: Prevent negative stockIntermediatePremium
- #111Group anagrams: Several word familiesIntermediatePremium
- #112Group anagrams: No matchesIntermediatePremium
- #113Invert a dictionary: Code lookupIntermediatePremium
- #114Invert a dictionary: Numeric-looking valuesIntermediatePremium
- #115Find the top k frequent values: Top two product codesIntermediatePremium
- #116Find the top k frequent values: Frequency tieIntermediatePremium
- #117Merge numeric dictionaries: Combine branch salesIntermediatePremium
- #118Merge numeric dictionaries: No shared keysIntermediatePremium
- #119Build an adjacency list: Small networkIntermediatePremium
- #120Build an adjacency list: Include an isolated vertexIntermediatePremium
Functions and Functional Tools
Write reusable functions and meet lambda, map, filter, reduce, closures, generators, and decorators.
- #121Reuse a prime-checking function: Prime function true caseIntermediatePremium
- #122Reuse a prime-checking function: Prime function false caseIntermediatePremium
- #123Calculate tax with an optional rate: Standard taxIntermediatePremium
- #124Calculate tax with an optional rate: Reduced taxIntermediatePremium
- #125Average any number of values: Four ratingsIntermediatePremium
- #126Average any number of values: One readingIntermediatePremium
- #127Sort records with a lambda: LeaderboardIntermediatePremium
- #128Sort records with a lambda: Tie by nameIntermediatePremium
- #129Square values with map: Positive sequenceIntermediatePremium
- #130Square values with map: Signed sequenceIntermediatePremium
- #131Filter passing scores: Standard pass markIntermediatePremium
- #132Filter passing scores: Everyone passesIntermediatePremium
- #133Multiply values with reduce: Package combinationsIntermediatePremium
- #134Multiply values with reduce: Zero factorIntermediatePremium
- #135Create a discount closure: Festival discountIntermediatePremium
- #136Create a discount closure: No discountIntermediatePremium
- #137Generate a countdown: Launch countdownIntermediatePremium
- #138Generate a countdown: Immediate finishIntermediatePremium
- #139Log a function call with a decorator: Log a greetingIntermediatePremium
- #140Log a function call with a decorator: Forward a spaced argumentIntermediatePremium
Recursion and Backtracking
Understand base cases, shrinking subproblems, recursive search, and choice-and-undo backtracking.
- #141Compute factorial recursively: Recursive arrangement countIntermediatePremium
- #142Compute factorial recursively: Recursive base caseIntermediatePremium
- #143Sum digits recursively: ChecksumIntermediatePremium
- #144Sum digits recursively: Negative inputIntermediatePremium
- #145Calculate integer power recursively: Large exponent efficientlyIntermediatePremium
- #146Calculate integer power recursively: Zero exponentIntermediatePremium
- #147Find GCD recursively: Shared factorIntermediatePremium
- #148Find GCD recursively: Second input zeroIntermediatePremium
- #149Binary search recursively: Found targetIntermediatePremium
- #150Binary search recursively: Missing targetIntermediatePremium
- #151Check a palindrome recursively: Odd-length palindromeIntermediatePremium
- #152Check a palindrome recursively: Early mismatchIntermediatePremium
- #153Generate all permutations: Three-character arrangementsIntermediatePremium
- #154Generate all permutations: Two-character arrangementsIntermediatePremium
- #155Generate all subsets: Feature subsetsIntermediatePremium
- #156Generate all subsets: Single valueIntermediatePremium
- #157Generate balanced parentheses: Three pairsIntermediatePremium
- #158Generate balanced parentheses: One pairIntermediatePremium
- #159Count N-Queens solutions: Classic four-queen boardIntermediatePremium
- #160Count N-Queens solutions: Five-queen boardIntermediatePremium
Files, Text Data, Exceptions, and Modules
Process file-like text safely and use Python's csv, json, datetime, pathlib, and exception tools.
- #161Count lines, words, and characters: Analyze a two-line noteIntermediatePremium
- #162Count lines, words, and characters: Blank line countsIntermediatePremium
- #163Total values from CSV rows: Small order CSVIntermediatePremium
- #164Total values from CSV rows: Decimal unit pricesIntermediatePremium
- #165Extract error log entries: Mixed application logIntermediatePremium
- #166Extract error log entries: No errorsIntermediatePremium
- #167Replace a word in text: Update a configuration noteIntermediatePremium
- #168Replace a word in text: No matching wordIntermediatePremium
- #169Divide safely with exceptions: Valid divisionIntermediatePremium
- #170Divide safely with exceptions: Zero denominatorIntermediatePremium
- #171Validate integer input: Accept signed integerIntermediatePremium
- #172Validate integer input: Reject decimal textIntermediatePremium
- #173Parse key-value configuration: Application settingsIntermediatePremium
- #174Parse key-value configuration: Value contains equalsIntermediatePremium
- #175Summarize JSON orders: Two JSON ordersIntermediatePremium
- #176Summarize JSON orders: Empty responseIntermediatePremium
- #177Calculate days between dates: Project durationIntermediatePremium
- #178Calculate days between dates: Cross a leap dayIntermediatePremium
- #179Count file extensions: Mixed project filesIntermediatePremium
- #180Count file extensions: Case and extensionless filesIntermediatePremium
Object-Oriented Python
Model state and behavior with classes, inheritance, composition, properties, and data classes.
- #181Model a rectangle class: Room objectIntermediatePremium
- #182Model a rectangle class: Decimal rectangleIntermediatePremium
- #183Model a bank account: Normal transactionsIntermediatePremium
- #184Model a bank account: Reject overdraftIntermediatePremium
- #185Model a student grade: Passing studentIntermediatePremium
- #186Model a student grade: Failing boundaryIntermediatePremium
- #187Build a shopping cart: Two-item cartIntermediatePremium
- #188Build a shopping cart: Empty cartIntermediatePremium
- #189Use inheritance for employees: Manager bonusIntermediatePremium
- #190Use inheritance for employees: Developer overtimeIntermediatePremium
- #191Protect temperature with a property: Valid temperatureIntermediatePremium
- #192Protect temperature with a property: Impossible temperatureIntermediatePremium
- #193Customize book display and equality: Same ISBNIntermediatePremium
- #194Customize book display and equality: Different ISBNIntermediatePremium
- #195Use a dataclass for inventory: Stock itemIntermediatePremium
- #196Use a dataclass for inventory: Zero quantityIntermediatePremium
- #197Model composition: Petrol carIntermediatePremium
- #198Model composition: Electric carIntermediatePremium
- #199Create a countdown iterator: Custom countdownIntermediatePremium
- #200Create a countdown iterator: Iterator edgeIntermediatePremium
Searching, Sorting, and Array Interviews
Practice the array, searching, sorting, interval, and hashing questions asked in interviews.
- #201Perform linear search: Find inventory codeInterviewPremium
- #202Perform linear search: Target missingInterviewPremium
- #203Perform iterative binary search: Find sorted recordInterviewPremium
- #204Perform iterative binary search: Outside the rangeInterviewPremium
- #205Find first and last occurrence: Repeated target rangeInterviewPremium
- #206Find first and last occurrence: Single occurrenceInterviewPremium
- #207Sort with bubble sort: Unsorted readingsInterviewPremium
- #208Sort with bubble sort: Already sortedInterviewPremium
- #209Sort with insertion sort: Nearly sorted scoresInterviewPremium
- #210Sort with insertion sort: Reverse orderInterviewPremium
- #211Sort with merge sort: General listInterviewPremium
- #212Sort with merge sort: Duplicates and negativesInterviewPremium
- #213Sort with quicksort: Quicksort practiceInterviewPremium
- #214Sort with quicksort: Many duplicate pivotsInterviewPremium
- #215Merge overlapping intervals: Meeting blocksInterviewPremium
- #216Merge overlapping intervals: Touching intervalsInterviewPremium
- #217Build product except self: Positive arrayInterviewPremium
- #218Build product except self: One zeroInterviewPremium
- #219Find the majority element: Clear majorityInterviewPremium
- #220Find the majority element: Short majorityInterviewPremium
Stacks, Queues, Linked Lists, Trees, and Graphs
Implement the core data structures and traversal patterns behind many technical interviews.
- #221Validate brackets with a stack: Nested expressionInterviewPremium
- #222Validate brackets with a stack: Wrong closing orderInterviewPremium
- #223Implement a queue with two stacks: Normal queue commandsInterviewPremium
- #224Implement a queue with two stacks: Empty queueInterviewPremium
- #225Reverse a linked list: Five-node listInterviewPremium
- #226Reverse a linked list: Single nodeInterviewPremium
- #227Find the middle linked-list node: Odd-length listInterviewPremium
- #228Find the middle linked-list node: Even-length conventionInterviewPremium
- #229Detect a linked-list cycle: Cycle to second nodeInterviewPremium
- #230Detect a linked-list cycle: Acyclic chainInterviewPremium
- #231Traverse a binary tree by levels: Three-level treeInterviewPremium
- #232Traverse a binary tree by levels: Single-node treeInterviewPremium
- #233Find binary-tree maximum depth: Unbalanced treeInterviewPremium
- #234Find binary-tree maximum depth: Empty treeInterviewPremium
- #235Validate a binary search tree: Valid BSTInterviewPremium
- #236Validate a binary search tree: Hidden violationInterviewPremium
- #237Traverse a graph with BFS: Connected graphInterviewPremium
- #238Traverse a graph with BFS: Disconnected graphInterviewPremium
- #239Find an unweighted shortest path: Route existsInterviewPremium
- #240Find an unweighted shortest path: Unreachable destinationInterviewPremium
Dynamic Programming and High-Frequency Interviews
Finish with high-frequency dynamic programming, grid, graph-ordering, and sliding-window problems.
- #241Count ways to climb stairs: Five stairsInterviewPremium
- #242Count ways to climb stairs: Zero stairsInterviewPremium
- #243Maximize nonadjacent house loot: Alternating opportunityInterviewPremium
- #244Maximize nonadjacent house loot: Two housesInterviewPremium
- #245Find minimum coins: Reachable amountInterviewPremium
- #246Find minimum coins: Impossible amountInterviewPremium
- #247Solve 0/1 knapsack: Choose best packageInterviewPremium
- #248Solve 0/1 knapsack: No item fitsInterviewPremium
- #249Find longest increasing subsequence length: Mixed sequenceInterviewPremium
- #250Find longest increasing subsequence length: Strictly decreasingInterviewPremium
- #251Find longest common subsequence length: Shared subsequenceInterviewPremium
- #252Find longest common subsequence length: No common charactersInterviewPremium
- #253Calculate edit distance: Classic conversionInterviewPremium
- #254Calculate edit distance: Empty targetInterviewPremium
- #255Find longest substring without repeats: Mixed repeatsInterviewPremium
- #256Find longest substring without repeats: All same characterInterviewPremium
- #257Count islands in a grid: Three islandsInterviewPremium
- #258Count islands in a grid: All waterInterviewPremium
- #259Topologically sort tasks: Valid build orderInterviewPremium
- #260Topologically sort tasks: Cyclic dependenciesInterviewPremium
Top Company Arrays, Strings, and Sliding Windows
Company-screen array and string patterns: two pointers, matrices, prefix sums, and sliding windows.
- #261Maximize one stock transaction: Profitable price historyCompany MediumPremium
- #262Maximize one stock transaction: Falling marketCompany MediumPremium
- #263Find unique three-sum triplets: Two valid tripletsCompany MediumPremium
- #264Find unique three-sum triplets: No zero-sum tripleCompany MediumPremium
- #265Maximize water between lines: Mixed container heightsCompany MediumPremium
- #266Maximize water between lines: Two-line minimumCompany MediumPremium
- #267Calculate trapped rain water: Classic elevation mapCompany HardPremium
- #268Calculate trapped rain water: No basinCompany HardPremium
- #269Find the longest consecutive run: Unsorted runCompany MediumPremium
- #270Find the longest consecutive run: Duplicates inside a runCompany MediumPremium
- #271Rotate a square matrix clockwise: Three-by-three imageCompany MediumPremium
- #272Rotate a square matrix clockwise: Two-by-two matrixCompany MediumPremium
- #273Read a matrix in spiral order: Rectangular spiralCompany MediumPremium
- #274Read a matrix in spiral order: Single columnCompany MediumPremium
- #275Set matrix rows and columns to zero: One internal zeroCompany MediumPremium
- #276Set matrix rows and columns to zero: Several original zerosCompany MediumPremium
- #277Count subarrays with target sum: Repeated target sumsCompany MediumPremium
- #278Count subarrays with target sum: Include negative valuesCompany MediumPremium
- #279Find the minimum covering window: Smallest covering substringCompany HardPremium
- #280Find the minimum covering window: Impossible coverageCompany HardPremium
Top Company Stacks, Heaps, Intervals, and Linked Lists
Practice cache design, monotonic structures, heaps, intervals, and advanced linked-list patterns.
- #281Merge k sorted lists: Three sorted feedsCompany HardPremium
- #282Merge k sorted lists: Single sourceCompany HardPremium
- #283Add numbers stored in linked lists: Different three-digit numbersCompany MediumPremium
- #284Add numbers stored in linked lists: Carry creates a new digitCompany MediumPremium
- #285Copy a random-pointer list: Mixed random linksCompany HardPremium
- #286Copy a random-pointer list: No random linksCompany HardPremium
- #287Reorder a linked list: Even-length chainCompany MediumPremium
- #288Reorder a linked list: Odd-length chainCompany MediumPremium
- #289Implement an LRU cache: Evict old entriesCompany HardPremium
- #290Implement an LRU cache: Refresh an existing keyCompany HardPremium
- #291Implement a minimum stack: Track changing minimumsCompany MediumPremium
- #292Implement a minimum stack: Duplicate minimumCompany MediumPremium
- #293Find warmer-day waits: Mixed forecastCompany MediumPremium
- #294Find warmer-day waits: Never warmerCompany MediumPremium
- #295Find the largest histogram rectangle: Classic histogramCompany HardPremium
- #296Find the largest histogram rectangle: Uniform barsCompany HardPremium
- #297Find sliding-window maximums: Overlapping windowsCompany HardPremium
- #298Find sliding-window maximums: Window of oneCompany HardPremium
- #299Count required meeting rooms: Overlapping meetingsCompany MediumPremium
- #300Count required meeting rooms: Back-to-back meetingsCompany MediumPremium
Top Company Trees and Tries
Cover the binary-tree, BST, trie, traversal, serialization, and path questions seen in coding loops.
- #301Find lowest common ancestor: Targets in different subtreesCompany MediumPremium
- #302Find lowest common ancestor: One node is an ancestorCompany MediumPremium
- #303Find kth smallest value in a BST: Third smallestCompany MediumPremium
- #304Find kth smallest value in a BST: Smallest valueCompany MediumPremium
- #305Serialize and deserialize a binary tree: Sparse tree round tripCompany HardPremium
- #306Serialize and deserialize a binary tree: Trim redundant trailing nullsCompany HardPremium
- #307Build a tree from preorder and inorder: Balanced reconstructionCompany MediumPremium
- #308Build a tree from preorder and inorder: Right-skewed reconstructionCompany MediumPremium
- #309View a binary tree from the right: Sparse right viewCompany MediumPremium
- #310View a binary tree from the right: Left-only treeCompany MediumPremium
- #311Calculate binary-tree diameter: Diameter crosses rootCompany MediumPremium
- #312Calculate binary-tree diameter: Skewed treeCompany MediumPremium
- #313List root-to-leaf target paths: Two valid pathsCompany MediumPremium
- #314List root-to-leaf target paths: No target pathCompany MediumPremium
- #315Implement a prefix trie: Word and prefix checksCompany MediumPremium
- #316Implement a prefix trie: Missing prefixCompany MediumPremium
- #317Find dictionary words in a board: Several board wordsCompany HardPremium
- #318Find dictionary words in a board: No word can be formedCompany HardPremium
- #319Find maximum binary-tree path sum: Best path crosses a subtree rootCompany HardPremium
- #320Find maximum binary-tree path sum: All negative valuesCompany HardPremium
Top Company Graphs and Union-Find
Solve connectivity, dependency, weighted-path, and ordering problems with graph algorithms.
- #321Count connected components with union-find: Two graph componentsCompany MediumPremium
- #322Count connected components with union-find: No edgesCompany MediumPremium
- #323Find a redundant graph edge: Triangle cycleCompany MediumPremium
- #324Find a redundant graph edge: Longer cycleCompany MediumPremium
- #325Check if courses can be completed: Acyclic prerequisitesCompany MediumPremium
- #326Check if courses can be completed: Circular prerequisitesCompany MediumPremium
- #327Clone an undirected graph: Connected graph cloneCompany MediumPremium
- #328Clone an undirected graph: Include isolated nodeCompany MediumPremium
- #329Merge accounts by shared email: Shared email mergeCompany MediumPremium
- #330Merge accounts by shared email: No shared emailsCompany MediumPremium
- #331Find a word-ladder length: Reachable transformationCompany HardPremium
- #332Find a word-ladder length: Missing destinationCompany HardPremium
- #333Evaluate division queries: Connected ratiosCompany MediumPremium
- #334Evaluate division queries: Disconnected variablesCompany MediumPremium
- #335Find network delay time: All nodes reachedCompany MediumPremium
- #336Find network delay time: Unreachable nodeCompany MediumPremium
- #337Find cheapest flight with stop limit: Cheaper one-stop routeCompany MediumPremium
- #338Find cheapest flight with stop limit: Stop limit blocks routeCompany MediumPremium
- #339Infer an alien alphabet: Valid alien orderCompany HardPremium
- #340Infer an alien alphabet: Invalid prefix orderCompany HardPremium
Top Company Greedy, DP, Backtracking, and Bit Problems
Finish the company set with greedy proofs, dynamic programming, backtracking, grids, and bit logic.
- #341Decide if the last array index is reachable: Reachable final indexCompany MediumPremium
- #342Decide if the last array index is reachable: Blocked by zeroCompany MediumPremium
- #343Find a valid gas-station start: One valid starting stationCompany MediumPremium
- #344Find a valid gas-station start: Impossible circuitCompany MediumPremium
- #345Partition values into equal sums: Equal partition existsCompany MediumPremium
- #346Partition values into equal sums: Equal partition impossibleCompany MediumPremium
- #347Segment a string into dictionary words: Segmentable textCompany MediumPremium
- #348Segment a string into dictionary words: Near match failsCompany MediumPremium
- #349Count numeric message decodings: Several decodingsCompany MediumPremium
- #350Count numeric message decodings: Leading zeroCompany MediumPremium
- #351Count unique paths with obstacles: One central obstacleCompany MediumPremium
- #352Count unique paths with obstacles: Start blockedCompany MediumPremium
- #353Generate target-sum combinations: Two combination familiesCompany MediumPremium
- #354Generate target-sum combinations: No combinationCompany MediumPremium
- #355Search a word in a character board: Word existsCompany MediumPremium
- #356Search a word in a character board: Reuse would be requiredCompany MediumPremium
- #357Validate a Sudoku board: Valid partial boardCompany MediumPremium
- #358Validate a Sudoku board: Invalid duplicateCompany MediumPremium
- #359Find the single value with XOR: Unpaired positive valueCompany MediumPremium
- #360Find the single value with XOR: Negative single valueCompany MediumPremium