is a “non-decreasing” sequence “increasing”?

后端 未结 8 721
梦如初夏
梦如初夏 2020-12-23 16:27

While studying the book \"Introduction to Algorithms by Cormen\", I found a strange thing. Everywhere if it refers to an increasing order, the book refers it as \"non-decrea

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-23 16:43

    The series can be increasing and decreasing as others already explained but can also be non of them.

    (1,3,2,4,5,9,1,0)

    Is neither decreasing nor increasing. However, there are subsets like 2,4,5,9 that are increasing or 9,1,0 decreasing

提交回复
热议问题