Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const tries = +gets();
- for (let i = 0; i < tries; i++) {
- let array = gets().split(',').map(e => +e);
- let isArraySorted = true;
- for (let j = 0; j < array.length - 1; j++) {
- if (array[j] > array[j + 1]) {
- isArraySorted = false;
- break;
- }
- }
- print(isArraySorted);
- }
Advertisement
Add Comment
Please, Sign In to add comment