Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def alphabetSubsequence(s)
- array_length = s.length
- x = 0
- y = 1
- while (x < array_length)
- while (y < array_length)
- if s[x] == s[y] or s[y] <= s[x] then
- return false
- end
- y = y + 1
- end
- x = x + 1
- y = x + 1
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment