public static String reverse(String s) {
        if(s.length() <= 1) {
            return s;
        }
        
        // initialize array and pointers
        char[] c = s.toCharArray();
        int start = 0;
        int end = s.length() - 1;
        
        while(start < end) {
            // swap characters
            char temp = c[start];
            c[start] = c[end];
            c[end] = temp;
            
            // increment pointers
            start++;
            end--;
        }
        
        return new String(c);
    }