Recent Changes - Search:

Oktatás

* Programozás 2
  + feladatsor
  + C feladatsor
  + Python feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

* Adator. prog.
  + feladatsor
  + quick link

Teaching

* Prog. for Data Sci.
  ◇ exercises
  ◇ quick link

teaching assets


Félévek

* 2025/26/1
* archívum


Linkek

* kalendárium
   - munkaszüneti napok '20
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C++
* C#
* Clojure
* D lang.
* Java
* Nim
* Scala


[ edit | logout ]
[ sandbox | passwd ]

Is the array sorted?

See also std.algorithm.sorting.

(1) Is sorted?
import std.stdio;
import std.algorithm;

void main()
{
    auto a = [1, 2, 3];
    auto b = [1, 3, 3, 5, 5, 8];

    writeln(isSorted(a)); // true
    writeln(isSorted(b)); // true

    writeln(isStrictlyMonotonic(a)); // true
    writeln(isStrictlyMonotonic(b)); // false
}

Notes:

  • isSorted(): equal values are allowed
  • isStrictlyMonotonic(): equal values are NOT allowed
Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2025 August 24, 17:09