Grokking the Coding Interview: Patterns for Coding Questions
Ask Author
Back to course home

0% completed

Vote For New Content
Vu Dao
Requirement was confused at a[i] != a[i+1]

Vu Dao

Jan 12, 2024

Monotonically increasing or decreasing means that for any index i in the array arr[i] != arr[i+1]. I saw this test case, is it valid? arr[4] == arr[5]

[1, 2, 3, 4, 5, 5, 4, 3, 2, 1]

Anw, I'll update my answer.

0

0

Comments
Comments

On this page