Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Longest Repeating Character Replacement

MediumLeetCode 424 ↗

The problem, in one line. Given a string of capital letters and a budget of k edits, where an edit turns any one letter into any other, find the longest unbroken run of one repeated letter you can make. LeetCode 424.

The tell. “Longest unbroken stretch” with a budget of allowed mistakes. A stretch is fixable when its width minus its most common letter is at most k, since everything that is not the common letter is what you must edit.

Included with a plan

This solution is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.