Tests greedy grouping with ordered data structures. The same problem appears as LC 1296 (Divide Array in Consecutive Sets).
Enable JavaScript for the full StreamPrep guide.