educative.io

Educative

I think the solution miss the edge cases

Regarding the definition of bitonic subsequence “A subsequence is considered bitonic if it is monotonically increasing and then monotonically decreasing.”

So, I think the solution should consider the given inputs which have no decreasing subsequence to the end or have no decreasing subsequence to the beginning.

For example:
Input = {1, 1, 2} or {2, 2, 1}
Should return 0 - no bitonic subsequence


Type your question above this line.

Course: https://www.educative.io/collection/5668639101419520/5633779737559040
Lesson: https://www.educative.io/collection/page/5668639101419520/5633779737559040/5755034180517888