Created
February 23, 2021 23:56
-
-
Save commanderh/5ec62f44f4eb24c24d4876bc6f34c69f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
Write a recursive solution called `isSorted` to determine if the input array | |
is sorted in ascending order. | |
Examples: | |
isSorted([1, 2, 3, 4, 5]); // true | |
isSorted([1, 2, 4, 3, 5]); // false | |
isSorted([2, 4, 6, 7, 8]); // true | |
isSorted([5, 4, 3, 2, 1]); // false | |
***********************************************************************/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment