Check Sorted Problem
Check Sorted Problem — ExecCode School DSA Practice
Solve the Check Sorted problem on ExecCode. Free online school DSA practice in Arrays - Logic Building. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a list of whole numbers. Your task is to check if these numbers are arranged from the smallest to the largest. If they are, print "Yes". Otherwise, print "No".
Examples
Input 5 1 2 3 4 5; Output Yes. Input 5 5 4 3 2 1; Output No
Constraints
1 <= N <= 1000
Practice Check Sorted free on ExecCode. Browse DSA problems, topic map, and placement guides.