Greetings.
There is any O(N LOG K)
algorithm for longest not strictly increasing subsequence?
Example for longest not strictly increasing subsequence:
n = 3
a[] = {1, 1, 1}
Normal O(N LOG K)
algorithm will give answer = 1
. (Because it's work strictly increasing)
I need modified algorithm to give answer = 3
.
Thanks in advance.