Maximal initial run

ID: maximal-initial-run

The longest nondecreasing prefix of a specified segment. For a nonempty segment , its endpoint is the first with and , or if no such descent exists. Scanning adjacent pairs takes time proportional to the returned run length. An empty segment has an empty maximal initial run.

New to topics? Read the docs here!