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