Arrays and their sorted orders

  1. Strictly increasing - every element of the stack is strictly greater than the previous element. Example - [1, 4, 5, 8, 9]

  2. Non-decreasing - every element of the stack is greater than or equal to the previous element. Example - [1, 4, 5, 5, 8, 9, 9]

  3. Strictly decreasing - every element of the stack is strictly smaller than the previous element - [9, 8, 5, 4, 1]

  4. Non-increasing - every element of the stack is smaller than or equal to the previous element. - [9, 9, 8, 5, 5, 4, 1]

Type
Operator

Strictly Increasing

>

Non Decreasing

>=

Strictly decreasing

<

Non Increasing

<=

Last updated

Was this helpful?