public void sortLetters(char[] chars) {
        //write your code here
        if (chars == null || chars.length == 0)
            return;
        int ptr1 = 0, ptr2 = chars.length - 1;
        while (ptr1 < ptr2) {
            if (!Character.isLowerCase(chars[ptr1])) {
                while (ptr1 < ptr2 && !Character.isLowerCase(chars[ptr2])) {
                    ptr2 -= 1;
                }
                if (ptr1 < ptr2)
                    swap(chars, ptr1, ptr2);
            } else {
                ptr1 += 1;
            }
        }

    }