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

后端 未结 8 695
梦如初夏
梦如初夏 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:50

    Increasing - 1 2 3 4

    Nondecreasing - 1 1 2 3

    The difference being that in an increasing sequence, for x(n) and x(n+1), x(n+1) > x(n) whereas in a non-decreasing sequence, x(n+1) >= x(n)

提交回复
热议问题