Untitled
user_5668965
python
a year ago
111 B
10
Indexable
for _ in range(int(input())): n = int(input()) s = input() print("YES" if list(s) == sorted(s) else "NO")
Editor is loading...
Leave a Comment
for _ in range(int(input())): n = int(input()) s = input() print("YES" if list(s) == sorted(s) else "NO")