Combinatorica`
Combinatorica`

Runs

Runs[p]

partitions p into contiguous increasing subsequences.

Details and Options