MMethod
Workspace Your accountExplore questions

Original personal curriculum

Coding question browser

Every row is an original coding question. These are review-gated candidates, not copied third-party questions. The catalog contains 250 candidates before publication.

250 / 250coding questions in review
Customize weekly plan โ†’
Coding questionDifficultyTime
  1. Advanced Graphs

    11 questions
    Coding question

    Find the final signal arrival

    A directed network has nonnegative travel times. Return the time when every node first receives a signal from source, or -1 when a node is unreachable.

    Intermediate28 min
    Coding question

    Connect stations at minimum cost

    Return the smallest total cost needed to connect every station with undirected links. Return -1 when full connection is impossible.

    Advanced32 min
    Coding question

    Find a route with limited hops

    Return the least travel cost from source to destination using at most maxHops edges. Return -1 when no such route exists.

    Advanced35 min
    Coding question

    Connect stations with minimum wire

    Return the minimum total wire length that connects every station. Each edge gives two station IDs and a positive cost.

    Foundation18 min
    Coding question

    Find paths with negative edges

    Return shortest distances from source in a directed graph with negative edges. Return null when a reachable negative cycle exists.

    Intermediate25 min
    Coding question

    Find a route with limited stops

    Return the lowest price from start to goal using at most maxStops intermediate stops. Return -1 when no allowed route exists.

    Advanced35 min
    Coding question

    Identify bridge links

    Return every undirected edge whose removal increases the number of connected components.

    Advanced35 min
    Coding question

    Find the most reliable route

    Return the highest success probability from start to goal when edge probabilities multiply.

    Intermediate25 min
    Coding question

    Answer merge queries

    Process merge and connected queries. Return answers for connected queries in order.

    Intermediate25 min
    Coding question

    Find limited-stop fare

    Return the least route cost with at most maxStops intermediate nodes.

    Intermediate25 min
    Coding question

    Measure network arrival time

    Return the time until all nodes receive a signal, or -1 when any node stays unreachable.

    Intermediate25 min
  2. Arrays Hashing

    20 questions
    Coding question

    Build a frequency ledger

    Return a map that gives the count for each integer in values.

    Foundation12 min
    Coding question

    Find the first repeated arrival

    Return the first index whose value occurred at an earlier index. Return -1 when no value repeats.

    Foundation14 min
    Coding question

    List shared values once

    Return each integer that occurs in both input lists exactly once. Keep the order from the first list.

    Intermediate18 min
    Coding question

    Find the longest balanced sum span

    Return the longest contiguous span whose integer values sum to zero.

    Advanced24 min
    Coding question

    Count divisible pair totals

    Return the number of index pairs whose values have a sum divisible by divisor.

    Foundation16 min
    Coding question

    Apply range change requests

    Each request adds delta to every value from left through right. Return the final value list after all requests.

    Intermediate24 min
    Coding question

    Find the least common label

    Return the first value from left that also occurs in right. Return null when the lists share no value.

    Intermediate24 min
    Coding question

    Count matching prefix and suffix totals

    Return the number of split positions where the sum before the split equals the sum after it.

    Advanced32 min
    Coding question

    Group values by parity

    Return values with even values first and odd values second. Preserve the original order inside each group.

    Foundation18 min
    Coding question

    Find the first missing positive

    Return the smallest positive integer missing from values. Use the input array as storage when possible.

    Advanced35 min
    Coding question

    Find the smallest missing nonnegative value

    Return the smallest nonnegative integer that does not occur in values.

    Foundation18 min
    Coding question

    Multiply values except one index

    Return an array where each output position is the product of all input values except that position. Do not use division.

    Advanced35 min
    Coding question

    Find the first absent positive

    Return the smallest positive integer that does not occur in values.

    Advanced35 min
    Coding question

    Measure trapped rainwater

    Return the total water trapped between nonnegative column heights after rain.

    Advanced35 min
    Coding question

    Count balanced signs

    Return true when a list contains equal counts of positive and negative values. Ignore zero.

    Foundation18 min
    Coding question

    Compact sorted unique values

    Remove duplicates from a sorted array in place and return the new length.

    Foundation18 min
    Coding question

    Find equal parity span

    Return the longest contiguous span with equal even and odd values.

    Intermediate25 min
    Coding question

    Multiply other positions

    Return values where each position equals the product of all other values without division.

    Intermediate25 min
    Coding question

    Find a missing positive tag

    Return the smallest positive integer that does not occur in values.

    Intermediate25 min
    Coding question

    Count target-sum spans

    Return the count of contiguous spans whose values sum to target.

    Intermediate25 min
  3. Backtracking

    12 questions
    Coding question

    List unique target bundles

    Return all unique combinations of distinct input values that total target. Use each input position at most once.

    Foundation22 min
    Coding question

    Trace a word through a letter grid

    Return true when adjacent grid cells can spell word. Moves use up, down, left, or right. Do not reuse a cell in one route.

    Intermediate25 min
    Coding question

    Choose nonadjacent positions

    Return the largest sum from a list when selected positions cannot be adjacent. Also return one valid set of selected positions.

    Intermediate25 min
    Coding question

    Generate balanced symbol strings

    Return all strings with count opening and count closing parentheses that are balanced at every prefix.

    Advanced30 min
    Coding question

    List fixed-size groups

    Return every size-count combination of values from 1 through limit in ascending lexical order.

    Foundation18 min
    Coding question

    Count nonrepeating board routes

    Return the number of routes from start to finish in an open grid. Move up, down, left, or right and visit each cell at most once per route.

    Intermediate25 min
    Coding question

    Restore four number groups

    Insert three dots into digits to create all valid four-part addresses. Each part is 0 through 255 and has no leading zero unless it is zero.

    Advanced35 min
    Coding question

    List sums to a target

    Return all combinations of distinct positive input values that sum to target. Return each combination in ascending value order.

    Intermediate25 min
    Coding question

    Count signed target expressions

    Assign plus or minus before each value. Return the number of assignments with total target.

    Intermediate25 min
    Coding question

    List nonadjacent target sums

    Return all value selections whose sum equals target and whose selected indices are not adjacent.

    Intermediate25 min
    Coding question

    Restore numeric addresses

    Return valid four-part addresses from a digits-only string.

    Intermediate25 min
    Coding question

    List keypad words

    Return all letter strings that a digit string can form with a phone keypad.

    Foundation18 min
  4. Binary Search

    15 questions
    Coding question

    Find the first true threshold

    A boolean array is false before one boundary and true from that boundary onward. Return the first true index, or -1 when none exists.

    Foundation14 min
    Coding question

    Compute an integer square root

    Return the greatest nonnegative integer whose square is not greater than value.

    Intermediate18 min
    Coding question

    Find the minimum usable rate

    Each job has a positive integer size. A worker processes at most rate units from one job per hour. Return the smallest rate that completes every job within hours.

    Advanced25 min
    Coding question

    Find the last negative value

    Return the last index containing a negative number in a sorted integer list. Return -1 when no value is negative.

    Foundation16 min
    Coding question

    Find the smallest rotated value

    An ascending list of distinct integers was rotated. Return its smallest value in logarithmic time.

    Intermediate24 min
    Coding question

    Find minimum shipping capacity

    Packages must ship in order over days days. Return the smallest daily capacity that ships every package on time.

    Advanced32 min
    Coding question

    Find the first greater value

    Return the first index whose sorted value is greater than target. Return values.length when none exists.

    Foundation18 min
    Coding question

    Find a signal peak

    A value is a peak when it is greater than its existing neighbors. Return any peak index.

    Intermediate25 min
    Coding question

    Find a local peak

    Return an index whose value is not smaller than adjacent values. Values outside the list act as negative infinity.

    Foundation18 min
    Coding question

    Find a rotated value

    Return the index of target in a rotated ascending list of distinct integers. Return -1 when absent.

    Intermediate25 min
    Coding question

    Locate a strict peak

    Return an index whose value is greater than its immediate neighbors. Values outside the list act as negative infinity.

    Intermediate25 min
    Coding question

    Locate the first ready point

    Return the smallest index where a false-then-true predicate becomes true. Return -1 when none is true.

    Foundation18 min
    Coding question

    Locate first one in rows

    Return the row index with the fewest leading zeroes in a sorted binary matrix.

    Foundation18 min
    Coding question

    Find a rotated minimum

    Return the smallest value in a rotated sorted array with distinct values.

    Intermediate25 min
    Coding question

    Locate a missing positive value

    Return the kth positive integer absent from a sorted positive list.

    Intermediate25 min
  5. Bit Manipulation

    11 questions
    Coding question

    Count enabled flags

    Return the number of one bits in a nonnegative integer.

    Foundation18 min
    Coding question

    Find the unique transmission

    Every transmission ID appears twice except one. Return the ID that appears once.

    Intermediate25 min
    Coding question

    Check required permissions

    Permissions are bit masks. Return true when every bit in required also appears in granted.

    Advanced35 min
    Coding question

    Check a single power bit

    Return true when value is a positive power of two.

    Foundation18 min
    Coding question

    Reverse a fixed bit field

    Reverse the lowest width bits of value. Return the resulting nonnegative integer.

    Intermediate25 min
    Coding question

    Find a signal without triples

    Every integer appears exactly three times except one. Return the integer that appears once.

    Advanced35 min
    Coding question

    Compute a range XOR

    Return the XOR of every integer from start through end, inclusive.

    Advanced35 min
    Coding question

    Reverse a fixed-width bit value

    Reverse the low width bits of a nonnegative integer and return the result.

    Intermediate25 min
    Coding question

    Locate the lowest set bit

    Return the zero-based position of the least significant one bit. Return -1 for zero.

    Foundation18 min
    Coding question

    Xor an inclusive range

    Return the bitwise XOR of all integers from left through right.

    Intermediate25 min
    Coding question

    Count set bits

    Return the number of one bits for every value from zero through limit.

    Foundation18 min
  6. Dynamic Programming 1d

    14 questions
    Coding question

    Plan rest stops

    A trail has a fatigue cost at each marker. Start before marker 0. Move one or two markers per step. Return the least total cost to reach beyond the last marker.

    Foundation18 min
    Coding question

    Count valid signal splits

    A signal is a string of digits. A one-digit group from 1 through 9 is valid. A two-digit group from 10 through 26 is valid. Return the number of valid full splits.

    Intermediate25 min
    Coding question

    Choose nonadjacent messages

    Each message has a value. You cannot choose adjacent messages because they use the same channel. Return the largest total value.

    Intermediate25 min
    Coding question

    Choose circular sensors

    Sensors form a circle. Activating adjacent sensors causes interference. Return the largest total reading from nonadjacent sensors.

    Advanced35 min
    Coding question

    Count step patterns

    A marker may advance one or three positions at a time. Return the number of ordered ways to reach exactly distance.

    Foundation18 min
    Coding question

    Measure a rising signal

    Return the length of the longest strictly increasing subsequence in readings.

    Intermediate25 min
    Coding question

    Choose an alternating total

    Choose a nonempty subsequence. Add the first chosen value, subtract the next, then continue alternating signs. Return the greatest possible total.

    Advanced35 min
    Coding question

    Choose values with a required gap

    Return the largest total from values when selected indices must differ by at least two.

    Foundation18 min
    Coding question

    Check a word split

    Return true when text can split into dictionary words without unused characters.

    Intermediate25 min
    Coding question

    Choose separated value totals

    Choosing value x earns its total occurrences but prevents choosing x minus one and x plus one. Return the greatest score.

    Advanced35 min
    Coding question

    Count allowed message breaks

    Return how many ways text can split into dictionary words. Return zero when no full split exists.

    Intermediate25 min
    Coding question

    Count stair paths with rest

    Return the number of ways to reach step n using moves of one, two, or a rest move of zero once per path.

    Foundation18 min
    Coding question

    Count valid digit decodes

    Return the number of letter decodings for a digits string where 1 maps to A through 26 maps to Z.

    Intermediate25 min
    Coding question

    Select nonadjacent values

    Return the greatest sum from values when adjacent positions cannot both be selected.

    Foundation18 min
  7. Dynamic Programming 2d

    12 questions
    Coding question

    Count safe grid routes

    A robot starts at the upper-left cell and moves only right or down. Cells with -1 are blocked. Return the number of routes to the lower-right cell.

    Foundation18 min
    Coding question

    Minimize grid risk

    Move from the upper-left cell to the lower-right cell using only right and down moves. Return the smallest sum of visited risk values.

    Intermediate25 min
    Coding question

    Find shared route length

    Two route codes are strings. Return the length of their longest shared sequence. Characters must keep their relative order.

    Intermediate25 min
    Coding question

    Edit one message into another

    Return the smallest number of insertions, removals, and replacements needed to change source into target.

    Advanced35 min
    Coding question

    Find the largest clear square

    A grid contains zero for clear cells and one for blocked cells. Return the side length of its largest all-clear square.

    Foundation18 min
    Coding question

    Check interleaved messages

    Return true when target can be formed by interleaving left and right while keeping the order within each source.

    Intermediate25 min
    Coding question

    Choose a paint route

    Rows contain paint costs for three colors. Paint one color per row. Adjacent rows cannot use the same color. Return the least total cost.

    Advanced35 min
    Coding question

    Find a minimum falling path

    Start in any top-row cell. Move to the next row directly below, below-left, or below-right. Return the smallest total.

    Intermediate25 min
    Coding question

    Find a minimum triangle route

    Return the minimum top-to-bottom total in a number triangle.

    Intermediate25 min
    Coding question

    Find shared grid route

    Return the greatest total collected by two travelers moving down or right through a grid.

    Intermediate25 min
    Coding question

    Measure text edits

    Return the fewest insertions, deletions, and replacements needed to convert first into second.

    Advanced35 min
    Coding question

    Count all-one squares

    Return the number of square submatrices containing only one values.

    Intermediate25 min
  8. Graphs

    18 questions
    Coding question

    Measure connected work areas

    Return the size of each connected component in an undirected graph. Return component sizes in ascending order.

    Foundation18 min
    Coding question

    Check a directed route

    Return true when a directed graph has a route from start to destination.

    Intermediate22 min
    Coding question

    Order build tasks

    Return a valid task order from prerequisite pairs. Return an empty list when the dependencies contain a cycle.

    Intermediate25 min
    Coding question

    Find nodes with only safe exits

    Return all directed-graph nodes from which every possible route eventually reaches a node with no outgoing edge.

    Advanced30 min
    Coding question

    Count separate clusters

    Given an undirected graph with nodes zero through nodeCount minus one, return its number of connected components.

    Foundation18 min
    Coding question

    Find a shortest word ladder

    Return the smallest number of words in a one-letter-change route from start to goal using only allowed words. Return zero when no route exists.

    Intermediate25 min
    Coding question

    Create a safe course order

    Return one order that completes every task after its prerequisites. Return an empty list when the prerequisites contain a cycle.

    Intermediate25 min
    Coding question

    Check two-color graph groups

    Return true when an undirected graph can assign one of two colors to every node without equal-colored neighbors.

    Advanced35 min
    Coding question

    Escape a rising-water grid

    Return the earliest time to reach the lower-right cell. At time t, you may enter only cells with height at most t.

    Advanced35 min
    Coding question

    Check a route exists

    Return true when a directed route exists from start to goal.

    Foundation18 min
    Coding question

    Copy an undirected network

    Return a deep copy of a connected undirected graph node.

    Intermediate25 min
    Coding question

    Count shortest hop paths

    Return the number of shortest paths from start to goal in an unweighted undirected graph.

    Foundation18 min
    Coding question

    Capture enclosed grid cells

    Change every zero region fully surrounded by ones into ones. Keep zero regions connected to the border.

    Intermediate25 min
    Coding question

    Find a route through a required edge

    Return the shortest unweighted path length from start to goal that uses requiredEdge in either direction. Return -1 when none exists.

    Advanced35 min
    Coding question

    Find an even-edge route

    Return the shortest edge count from start to goal using an even number of edges. Return -1 when none exists.

    Intermediate25 min
    Coding question

    Check two-color graph

    Return true when graph nodes can use two colors with different edge endpoints.

    Intermediate25 min
    Coding question

    Order dependent tasks

    Return one valid task order from prerequisite pairs. Return an empty list for a cycle.

    Intermediate25 min
    Coding question

    Find shortest word transformations

    Return the fewest one-letter changes from start to goal using only dictionary words.

    Advanced35 min
  9. Greedy

    13 questions
    Coding question

    Refuel at checkpoints

    A vehicle starts with zero fuel. Each checkpoint provides fuel and is at a known distance. Return the smallest number of refuels needed to reach destination, or -1.

    Foundation18 min
    Coding question

    Select deadline projects

    Each project takes one day, has a deadline, and has a reward. Return the largest reward from projects completed by their deadlines.

    Intermediate25 min
    Coding question

    Remove digits for a smaller number

    Remove exactly k digits from a nonnegative decimal string. Return the smallest possible remaining number without leading zeros.

    Advanced35 min
    Coding question

    Check the farthest reach

    Each value gives the farthest forward jump from its index. Return true when the last index is reachable.

    Foundation18 min
    Coding question

    Rebuild a height queue

    Each person is [height, ahead], where ahead is the number of people at least that tall before them. Return one valid queue.

    Intermediate25 min
    Coding question

    Find a supply circuit start

    Locations form a circle. Supply[i] is collected at location i and cost[i] is needed to reach the next location. Return a valid start index or -1.

    Advanced35 min
    Coding question

    Count minimum range jumps

    Each value gives the greatest forward jump from its index. Return the fewest jumps needed to reach the last index.

    Foundation18 min
    Coding question

    Distribute increasing rewards

    Each child needs at least one reward. A child with a greater rating than a neighbor needs more rewards. Return the smallest total.

    Advanced35 min
    Coding question

    Partition independent labels

    Split a lowercase string into the largest number of parts where no letter appears in more than one part.

    Intermediate25 min
    Coding question

    Reach a destination with few stops

    Return the fewest refuel stops needed to reach target. Return -1 when impossible.

    Advanced35 min
    Coding question

    Burst overlapping ranges

    Return the fewest points needed to intersect every closed interval.

    Intermediate25 min
    Coding question

    Partition closed symbol spans

    Split text into the most parts so each symbol occurs in only one part.

    Intermediate25 min
    Coding question

    Check jump reachability

    Return true when jumps of at most each value can reach the final index.

    Foundation18 min
  10. Heaps

    11 questions
    Coding question

    Schedule urgent service requests

    Return request identifiers in service order. Lower priority numbers run first. Equal priority requests keep their arrival order.

    Foundation18 min
    Coding question

    Merge scheduled event streams

    Merge several individually sorted event-time lists into one sorted list of event times.

    Intermediate25 min
    Coding question

    Report each running middle value

    For each prefix of integer values, return its median. For an even prefix, return the lower middle value.

    Advanced30 min
    Coding question

    Find the kth closest distance

    Return the kth smallest nonnegative distance in an unsorted list.

    Foundation18 min
    Coding question

    Merge sorted reading streams

    Merge ascending reading lists into one ascending list.

    Intermediate25 min
    Coding question

    Select the most common readings

    Return the k integer values with the greatest occurrence counts. For equal counts, return the smaller value first.

    Advanced35 min
    Coding question

    Rearrange symbols with spacing

    Rearrange symbols so equal symbols are never adjacent. Return an empty string when this is impossible.

    Advanced35 min
    Coding question

    Find the smallest range covering streams

    Given ascending integer lists, return the shortest inclusive range containing one value from every list.

    Advanced35 min
    Coding question

    Select closest coordinates

    Return k points nearest the origin. Break equal distances by x then y.

    Intermediate25 min
    Coding question

    Merge sorted value streams

    Return one sorted list from sorted integer lists.

    Intermediate25 min
    Coding question

    Separate repeated symbols

    Reorder text so equal adjacent symbols never occur. Return an empty string when impossible.

    Advanced35 min
  11. Intervals

    11 questions
    Coding question

    Merge touching reservations

    Given time ranges with inclusive starts and ends, merge overlapping or touching ranges. Return ranges in ascending start order.

    Foundation18 min
    Coding question

    Count loading gates

    Each delivery uses a gate from start through end, with an end freeing the gate before a new start at the same time. Return the smallest required gate count.

    Intermediate25 min
    Coding question

    Keep compatible sessions

    Return the largest number of nonoverlapping sessions. A session ending at time t is compatible with one starting at t.

    Advanced35 min
    Coding question

    Find the first uncovered time

    Given closed coverage ranges and a limit, return the first integer from zero through limit that no range covers. Return -1 when all are covered.

    Foundation18 min
    Coding question

    Attend the most events

    Each event has an inclusive start and end day. Attend at most one event per day. Return the greatest number of events you can attend.

    Intermediate25 min
    Coding question

    Remove overlapping ranges

    Return the fewest ranges to remove so all remaining half-open ranges do not overlap.

    Advanced35 min
    Coding question

    Count reusable meeting rooms

    Return the fewest rooms for half-open meetings. A meeting ending at time t frees a room for one starting at t.

    Intermediate25 min
    Coding question

    Measure merged coverage

    Return the combined length covered by closed integer intervals.

    Intermediate25 min
    Coding question

    Find shared free ranges

    Return finite gaps not covered by any employee interval.

    Intermediate25 min
    Coding question

    Insert and merge a range

    Insert a closed interval into sorted disjoint ranges and merge overlaps.

    Intermediate25 min
    Coding question

    Count meeting rooms

    Return the fewest rooms required for half-open meeting intervals.

    Intermediate25 min
  12. Linked Lists

    17 questions
    Coding question

    Reverse a linked chain

    Reverse a singly linked chain and return its new first node.

    Foundation16 min
    Coding question

    Merge ordered chains

    Merge two ascending singly linked chains and return one ascending chain.

    Foundation18 min
    Coding question

    Find the later middle node

    Return the middle node of a singly linked chain. For an even number of nodes, return the second middle node.

    Intermediate18 min
    Coding question

    Remove a node from the chain end

    Remove the kth node from the end of a singly linked chain and return the resulting head.

    Advanced24 min
    Coding question

    Split a chain by a pivot

    Reorder a singly linked chain so nodes below pivot appear before nodes at or above pivot. Preserve the order within each group.

    Foundation16 min
    Coding question

    Find a cycle entry node

    Return the node where a singly linked chain cycle begins. Return null when the chain has no cycle.

    Intermediate24 min
    Coding question

    Remove repeated chain values

    A singly linked chain is sorted in ascending order. Remove duplicate nodes so every value occurs once.

    Intermediate24 min
    Coding question

    Copy a random-link chain

    Each node has next and random links. Return an independent deep copy with matching links.

    Advanced32 min
    Coding question

    Add reversed digit chains

    Two linked chains store nonnegative integers with least-significant digits first. Return their sum in the same form.

    Foundation18 min
    Coding question

    Remove alternate chain nodes

    Remove every second node from a singly linked chain, starting with the second node. Return the original head.

    Advanced35 min
    Coding question

    Find a shared chain node

    Two singly linked chains may share a tail. Return the first shared node, or null when they do not intersect.

    Intermediate25 min
    Coding question

    Swap adjacent chain pairs

    Swap each adjacent pair of nodes in a singly linked chain. Leave a final unpaired node unchanged.

    Advanced35 min
    Coding question

    Remove repeated chain values

    Given a sorted linked chain, remove repeated values so each value occurs once.

    Foundation18 min
    Coding question

    Measure a common chain suffix

    Return the number of shared node references at the end of two linked chains.

    Intermediate25 min
    Coding question

    Reverse one chain segment

    Reverse nodes from position start through end, using one-based positions.

    Intermediate25 min
    Coding question

    Reorder a linked chain

    Reorder nodes as first, last, second, second-last, and continue inward.

    Intermediate25 min
    Coding question

    Copy random chain links

    Create a deep copy of a linked chain whose nodes also have random references.

    Advanced35 min
  13. Math Geometry

    12 questions
    Coding question

    Measure grid rectangles

    A rectangle has axis-aligned corners. Return its area from two opposite corners. Coordinates may be negative.

    Foundation18 min
    Coding question

    Normalize a direction

    Return a stable direction key for a vector dx, dy. Equal directions must return equal keys even when both values have a common factor.

    Intermediate25 min
    Coding question

    Locate a spiral cell

    Positive integers fill an outward square spiral. Return the value at row and column, where the center is 1 at 0,0.

    Advanced35 min
    Coding question

    Measure a clock-hand gap

    Return the smaller angle between an analog clock hour hand and minute hand.

    Foundation18 min
    Coding question

    Check rectangle contact

    Return true when two axis-aligned rectangles share an area with positive width and height. Edge-only contact is false.

    Intermediate25 min
    Coding question

    Detect a repeated digit-square state

    Repeatedly replace a positive integer with the sum of its squared decimal digits. Return true when the process reaches one. Return false when it repeats another value.

    Intermediate25 min
    Coding question

    Count lattice paths

    Return the number of shortest paths from 0,0 to right,up when each move increases exactly one coordinate by one.

    Advanced35 min
    Coding question

    Measure rectangle overlap

    Return the area shared by two axis-aligned rectangles. Return zero when they do not overlap.

    Intermediate25 min
    Coding question

    Measure a clock angle

    Return the smaller angle between hour and minute hands.

    Foundation18 min
    Coding question

    Find most collinear points

    Return the greatest number of points on one straight line.

    Advanced35 min
    Coding question

    Walk a rectangular spiral

    Return grid coordinates visited in clockwise spiral order from the upper-left cell.

    Intermediate25 min
    Coding question

    Check robot return

    Return true when moves U, D, L, and R return a robot to the origin.

    Foundation18 min
  14. Sliding Window

    15 questions
    Coding question

    Find the strongest fixed window

    Return the greatest sum of any contiguous window with exactly width values.

    Foundation16 min
    Coding question

    Find a distinct-symbol stretch

    Return the greatest length of a substring with no repeated character.

    Intermediate20 min
    Coding question

    Find the smallest required cover

    Return the shortest substring of text that contains every character in required with at least its required count. Return an empty string when absent.

    Advanced28 min
    Coding question

    Find the strongest average window

    Return the greatest average of any contiguous window with exactly width values.

    Foundation16 min
    Coding question

    Find a replaceable symbol stretch

    Return the greatest substring length that can contain one repeated character after changing at most changes symbols.

    Intermediate24 min
    Coding question

    Find the smallest positive-total window

    Values are positive integers. Return the smallest contiguous length whose sum is at least target. Return zero when no window reaches target.

    Advanced32 min
    Coding question

    Find a permutation window

    Return true when text contains a contiguous permutation of pattern.

    Foundation18 min
    Coding question

    Find the largest bounded sum

    Return the largest sum of a contiguous positive-integer subarray whose sum is at most limit.

    Advanced35 min
    Coding question

    Find a bounded distinct span

    Return the longest substring that contains at most limit distinct characters.

    Intermediate25 min
    Coding question

    Find a permutation location

    Return the first index where text contains a permutation of pattern. Return -1 when no such substring exists.

    Advanced35 min
    Coding question

    Find the longest bounded sum window

    Return the greatest length of a positive-integer subarray with sum at most limit.

    Intermediate25 min
    Coding question

    Find the vowel window

    Return the longest substring with at most limit vowels.

    Intermediate25 min
    Coding question

    Count windows with enough distinct values

    Return the number of subarrays with at least k distinct values.

    Advanced35 min
    Coding question

    Find rearranged token starts

    Return every start index where text contains a rearrangement of pattern.

    Intermediate25 min
    Coding question

    Find the smallest required span

    Return the shortest text span that contains every required symbol with its required count.

    Advanced35 min
  15. Stacks

    15 questions
    Coding question

    Validate delimiter order

    Return true when every opening delimiter has the correct later closing delimiter. Support parentheses, brackets, and braces.

    Foundation16 min
    Coding question

    Find the next larger reading

    For each integer, return the first later integer that is greater. Use -1 when no later greater value exists.

    Intermediate22 min
    Coding question

    Evaluate a postfix expression

    Evaluate tokens containing integers and the operators +, -, *, and /. Division truncates toward zero.

    Advanced24 min
    Coding question

    Normalize unmatched parentheses

    Return a string after removing the fewest parentheses needed to make nesting valid. Keep all non-parenthesis characters.

    Foundation16 min
    Coding question

    Measure the next warmer delay

    For each temperature, return how many later days pass before a warmer temperature occurs. Return zero when none occurs.

    Intermediate24 min
    Coding question

    Find the largest histogram rectangle

    Bar heights form a histogram. Return the largest rectangle area that uses consecutive bars.

    Advanced32 min
    Coding question

    Track the smallest live value

    Process push and pop operations. Return the minimum after each operation, or null when the stack is empty.

    Foundation18 min
    Coding question

    Resolve moving collisions

    Positive and negative values move right and left. Return values that remain after equal-speed collisions.

    Advanced35 min
    Coding question

    Reduce path steps

    Normalize an absolute path with slash separators, dot for the current directory, and dot-dot for the parent directory.

    Foundation18 min
    Coding question

    Measure distance to a smaller value

    For each value, return the number of positions to the first later smaller value. Return -1 when no such value exists.

    Advanced35 min
    Coding question

    Measure the next warmer day

    For each temperature, return how many later positions lead to a warmer temperature. Return zero when none exists.

    Intermediate25 min
    Coding question

    Cancel adjacent pairs

    Repeatedly remove adjacent equal characters. Return the remaining string.

    Foundation18 min
    Coding question

    Score nested brackets

    Return the score where [] is one and nesting doubles a score.

    Intermediate25 min
    Coding question

    Find warmer-day delays

    Return how many later positions each temperature waits for a warmer value.

    Intermediate25 min
    Coding question

    Find the largest histogram rectangle

    Return the largest rectangle area under a histogram of nonnegative heights.

    Advanced35 min
  16. Trees

    19 questions
    Coding question

    Measure the widest tree level

    Return the largest number of non-null nodes that occur at one depth in a binary tree.

    Foundation15 min
    Coding question

    Total values in a search-tree range

    Return the sum of values in a binary search tree that are within an inclusive lower and upper bound.

    Intermediate20 min
    Coding question

    Collect the right edge view

    Return the last node value at each depth when a binary tree is scanned from left to right.

    Intermediate20 min
    Coding question

    Find a downward target path

    Return true when a binary tree has a downward parent-to-child path whose values total target. A path may start at any node.

    Advanced30 min
    Coding question

    Find the nearest leaf depth

    Return the smallest number of nodes on a root-to-leaf path. Return zero for an empty tree.

    Foundation18 min
    Coding question

    Check search-tree order

    Return true when every node in a binary tree satisfies strict binary-search-tree ordering.

    Intermediate25 min
    Coding question

    Find the largest branch total

    Return the largest sum on a root-to-leaf path in a binary tree. Node values can be negative.

    Intermediate25 min
    Coding question

    Find an ancestor when both nodes exist

    Return the lowest common ancestor of two values only when both values occur in a binary tree. Return null otherwise.

    Advanced35 min
    Coding question

    Average each tree level

    Return the average node value for every level of a binary tree.

    Foundation18 min
    Coding question

    Find the widest tree level

    Return the largest number of non-null nodes at one depth in a binary tree.

    Intermediate25 min
    Coding question

    Find the deepest left value

    Return the leftmost value on the deepest level of a nonempty binary tree.

    Foundation18 min
    Coding question

    Encode and rebuild a tree

    Encode a binary tree as text and rebuild the same tree from that text. Preserve null children.

    Advanced35 min
    Coding question

    Read the rightmost tree values

    Return the last visible node value at every depth when a binary tree is viewed from the right.

    Intermediate25 min
    Coding question

    Sum left leaf values

    Return the sum of values that are leaf nodes reached through a left edge.

    Foundation18 min
    Coding question

    Find a value ancestor

    Return the lowest common ancestor of two values in a binary tree with unique values.

    Intermediate25 min
    Coding question

    Count complete tree nodes

    Return node count in a complete binary tree faster than a full traversal when possible.

    Intermediate25 min
    Coding question

    Group values by column

    Return tree values grouped from leftmost vertical column to rightmost.

    Intermediate25 min
    Coding question

    Read the right tree view

    Return the visible node value from the right side at each tree depth.

    Foundation18 min
    Coding question

    Build a tree from orders

    Build the unique binary tree defined by preorder and inorder traversals.

    Advanced35 min
  17. Tries

    9 questions
    Coding question

    Count registered prefixes

    Build a prefix registry from lowercase words. Return how many stored words begin with each query prefix.

    Foundation18 min
    Coding question

    Match a token pattern

    Return true when a word registry contains a word matching a pattern. The question mark matches exactly one lowercase letter.

    Advanced30 min
    Coding question

    Replace words with shortest roots

    Given root words and a sentence, replace each sentence word with its shortest matching root. Keep unmatched words.

    Foundation18 min
    Coding question

    Return ranked word completions

    Return up to limit stored words that begin with prefix, ordered by increasing word length and then alphabetically.

    Advanced35 min
    Coding question

    Count words with a prefix

    Return how many distinct stored lowercase words begin with prefix.

    Intermediate25 min
    Coding question

    Check a word square

    Return true when each row of same-length words equals the matching column.

    Advanced35 min
    Coding question

    Find a short unique prefix

    Return the shortest prefix of word that occurs in no other dictionary word. Return an empty string when none exists.

    Intermediate25 min
    Coding question

    Sum prefix scores

    For every word, return the sum of dictionary prefix occurrence counts.

    Intermediate25 min
    Coding question

    Check word segmentation

    Return true when text can split into one or more dictionary words.

    Intermediate25 min
  18. Two Pointers

    15 questions
    Coding question

    Locate a sorted pair

    Given ascending values and a target, return two distinct indices whose values add to the target. Return an empty list when absent.

    Foundation14 min
    Coding question

    Compact a unique prefix

    Modify a sorted integer list so its first k positions contain each distinct value once. Return k.

    Foundation16 min
    Coding question

    Measure the best boundary area

    Two vertical markers have nonnegative heights. Return the largest area formed by two markers and the positions between them.

    Intermediate20 min
    Coding question

    Find three values for a target

    Return true when three distinct positions in values sum to target. Return false when no such three positions exist.

    Foundation16 min
    Coding question

    Reverse vowel positions

    Return a copy of text with vowels reversed while every other character stays in place.

    Foundation16 min
    Coding question

    Choose the closest three-value sum

    Return the sum of three distinct values whose total is closest to target. Inputs always have one unique closest total.

    Advanced32 min
    Coding question

    Allow one removed character

    Return true when text can become a palindrome after removing at most one character.

    Foundation18 min
    Coding question

    Measure trapped rain

    Return the total water held between nonnegative bar heights after rain.

    Advanced35 min
    Coding question

    Check a filtered palindrome

    Return true when letters and digits in text read the same forward and backward. Ignore case and other characters.

    Foundation18 min
    Coding question

    Partition three value groups

    Reorder values that contain only 0, 1, and 2 so equal values are adjacent in ascending order.

    Advanced35 min
    Coding question

    Sort three marker values

    Sort values containing only 0, 1, and 2 in place.

    Intermediate25 min
    Coding question

    Find a squared pair target

    Given sorted values, return whether two distinct values have squared values that sum to target.

    Intermediate25 min
    Coding question

    Reverse word order

    Reverse the word order in a mutable character array.

    Foundation18 min
    Coding question

    Hold the most water

    Return the greatest area between two vertical heights.

    Intermediate25 min
    Coding question

    Sort three marker values

    Sort values containing only zero, one, and two without a general sort.

    Intermediate25 min

Complete the skills check before you select a weekly plan. The plan should prioritize concepts with weaker answered evidence.