Combinatorica`
Combinatorica`

Runs

Runs[p]

partitions p into contiguous increasing subsequences.

Details