Sort Letters by Case
Problem
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"
Note
It's NOT necessary to keep the original order of lower-case letters and upper case letters.
Challenge
Do it in one-pass and in-place.