Runs

Runs[p]
partitions p into contiguous increasing subsequences.

DetailsDetails