Sort Letters by Case
Given a string which contains only letters. Sort it by lower case first and upper case second.
Example
For "abAcD", a reasonable answer is "acbAD"
Solution
先滑动在交换。
忘记了 <=
while left <= right:
Last updated
Was this helpful?