

def sortLetters(self, chars):
    '\n        General sort: O(n lg n)\n        But in this case, the possible elements are in a closed set - either lower case or upper case; thus O(n)\n\n        The array is abstracted to | closed set | open set |, and move all lower case letters into closed set.\n\n        :param chars: The letters array you should sort.\n        :return: NIL, in-place\n        '
    closed = (- 1)
    for (ind, val) in enumerate(chars):
        if (ord(val) < ord('a')):
            continue
        else:
            closed += 1
            (chars[ind], chars[closed]) = (chars[closed], chars[ind])

dataset/ETHPy150Open algorhythms/LintCode/Sort Letters by Case.py Solution.sortLetters/original