i downloaded the test case and code is perfect for all of them but on submitting one test case is failing
Why are all test cases not passing
In line 8, just add an equal to sign as well in arr[0]<arr[1].
This is because the array - 1 2 2 3 4 is also sorted but your code displays false in this case.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.