s
b
a
function checkString(s: string): boolean { const sorted = [...s].toSorted().join('') return s === sorted };