Untitled
user_5668965
python
07/20/2024 8:58 AM
148 B
28
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")