Problem 1539 · Easy

Kth Missing Positive Number

Find the kth positive integer missing from a sorted list by counting gaps and locating where the k-th gap lands. The visual lays the numbers on a line and marks the missing ones.

Open the interactive visualisation