Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

Programming 1 (BI)
  ▸ exercises
  ▸ quick link

teaching assets


Félévek

* 2025/26/2
* archívum


Linkek

* kalendárium
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C#
* D lang.
* Java
* Nim
* Nim2
  + exercises
* XC=BASIC
* old
  ✦C++, ✦Clojure, ✦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