iliqhanev

Untitled

Jan 8th, 2019
991
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const tries = gets();
  2. let sorted = '';
  3. for (i = 0; i < tries; i++) {
  4. let list = gets().split(',');
  5. for (j = 0; j < list.length - 1; j++) {
  6. if (list[j].localeCompare(list[j + 1]) == 1) {
  7. sorted = 'false';
  8. } else {
  9. sorted = 'true';
  10. }
  11. }
  12. print(sorted);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment