Challenges

Beginner journey

Very easy + easy · Your dashboard follows this path. Browse any difficulty in Challenges.

LET’S GET YOU STARTED

Add Two Counts

Return the sum of two supplied whole numbers.

Start a challenge 5 XP · 3 min

Your growing collection

Every solved challenge is a little win.

0 / 200 solved

0% of the selected library completed

FIND YOUR FLOW

Choose your challenge

Start small. Follow your curiosity.

Browse any difficulty. Very easy and easy challenges are free; medium and hard challenges require Pro to play.

200 challenges to discover
Easy

Build it yourself

Combine Matching Positions

The lists have equal length. Return a list containing first[i] + second[i] at each index.

Aligned numeric transformation

6 min12 languages
Easy

Build it yourself

What Remains after Each Item

For each position, return the sum of all items strictly after it. The final output item is always zero.

Total followed by subtraction

6 min12 languages
Easy

Build it yourself

Summarize Three Signs

Return [negative count, zero count, positive count]. Every input item belongs to exactly one category.

Independent category counters

6 min12 languages
Easy

Build it yourself

Count Readings above the Baseline

Treat the first item as a fixed baseline. Count later items strictly above that baseline. Empty input returns zero.

Input-derived comparison value

6 min12 languages
Easy

Build it yourself

Count Odd and Even Items

Return [even count, odd count]. Negative integers are classified by whether their remainder after division by 2 is zero.

Remainder categories

6 min12 languages
Easy

Build it yourself

Summarize an Allowed Range

Return [count below low, count inside inclusive low..high, count above high]. low <= high.

Three-way numeric classification

6 min12 languages
Easy

Build it yourself

One Positive Signal

Return true if exactly one item is strictly positive.

Exact-count predicate

6 min12 languages
Easy

Build it yourself

Do Positive Signals Win

Return true if more than half the items are strictly positive. An empty list returns false.

Strict-majority predicate

6 min12 languages
Easy

Build it yourself

Balance the Two Signs

Return true when there are equally many strictly positive and strictly negative items. Ignore zero items.

Equality of category counts

6 min12 languages
Easy

Build it yourself

Count Signals in Alternating Slots

Count strictly positive items at odd zero-based indices.

Combining value and position

6 min12 languages
Easy

Build it yourself

Count Readings near a Target

Count items whose absolute difference from target is at most tolerance. tolerance is nonnegative.

Distance-band counting

6 min12 languages
Easy

Build it yourself

How Much Exceeds the Limit

For each item above limit, add only item - limit. Return the total excess; items at or below limit contribute zero.

Conditional excess accumulation

6 min12 languages
Easy

Build it yourself

Track a Bounded Reservoir

Start with initial water, apply each signed change in order, and clamp the water to 0..capacity after every change. Return final water. 0 <= initial <= capacity <= 100.

Clamp after every event

6 min12 languages
Easy

Build it yourself

Follow Left and Right Commands

message contains only L, R and S. Start at position 0; L moves left by one, R moves right by one, and S stays. Return the final position.

Text-driven state updates

6 min12 languages
Easy

Build it yourself

The Furthest Point Visited

message contains only L and R. Start at 0 and move one step per command. Return the greatest distance from 0 reached at any time.

Current state and best distance

6 min12 languages
Easy

Build it yourself

Find the First Deficit

Start balance at initial and apply the signed changes in numbers. Return the first index that makes balance negative, or -1 if none does. initial is nonnegative.

State violation position

6 min12 languages
Easy

Build it yourself

Record the Account after Each Change

Start at initial and apply each signed change. Return the balance after every change; do not include the starting balance by itself.

Expose intermediate states

6 min12 languages
Easy

Build it yourself

Choose Purchases in Arrival Order

Prices are nonnegative. Visit prices in order: buy an item if its price is at most the remaining budget, otherwise skip it. Return the purchased indices. budget is nonnegative.

Greedy selection with a budget

6 min12 languages
Easy

Build it yourself

A Daily Spending Allowance

Each day spend up to the requested nonnegative amount, limited by current funds, then add refill and cap funds at capacity. Return final funds. 0 <= initial <= capacity; refill is nonnegative.

Order of periodic events

6 min12 languages
Easy

Build it yourself

Count Thermostat Changes

A heater begins off. Turn it on when a reading is below low, and turn it off when a reading is above high. At or between the bounds, keep its state. Return the number of switches. low < high.

Two-threshold state transitions

6 min12 languages
Easy

Build it yourself

Serve Customers with Change

Each item costs 5. Customers pay either 5 or 10 in the given order. Start with no cash and return true if every customer can receive exact change immediately.

Resource-dependent validation

6 min12 languages
Easy

Build it yourself

Score Alternating Turns

Two players alternate turns, starting with player one at index 0. Return [player one total, player two total]. Scores may be negative.

Two independent accumulators

6 min12 languages
Easy

Build it yourself

Compare Two Measurement Profiles

The lists have equal length. Return the sum of squared differences (first[i] - second[i]) squared.

Aligned differences and reduction

6 min12 languages
Easy

Build it yourself

Read between the Outer Marks

Return the text strictly between the first and last occurrence of marker. marker has one character. Fewer than two occurrences returns empty text.

First and last delimiter

6 min12 languages