Kotlinlearncs.online LogoJava
Return to List

Solve: Array is Increasing

Created By: Justin Maier
/ Version: 2024.7.0

Given a nonempty array of ints named nums, determine if nums is sorted in increasing order. You should declare a boolean variable named isIncreasing and set it to true if the array is increasing, and false otherwise.

For example: the arrays {1, 2, 3} and {1, 2, 2, 3} are both increasing but the array {1, 3, 2} is not.

Related Lessons

Stuck? You may find these lessons helpful: