Sobes.tech
Middle+

Implementeer de functie isMonotonic, die een array van getallen accepteert en bepaalt of deze monotoon is (stijgend of dalend). Geef true terug als de array monotoon is, anders false. Implementeer met lineaire complexiteit O(n).