1121. Divide Array Into Increasing Sequences
ArrayCounting
Hints
Hint 1
Think in the frequency of the numbers and how this affects the number of sequences needed.
Hint 2
What is the minimum number of sequences we need to form? Considering frequency of the numbers.
Hint 3
Think about the least number of sequences to maximize the lengths.
Hint 4
The number of sequences needed is equal to the maximum frequency of an element.
Hint 5
How to put the other elements into sequences ? Think in a greedy approach.
Preparing judge…