package com.fishercoder.solutions;

/**
 * 344. Reverse String
 *
 * Write a function that takes a string as input and returns the string reversed.

 Example:
 Given s = "hello", return "olleh".
 */
public class _344 {
    public static class Solution1 {
        public String reverseString(String s) {
            int i = 0;
            int j = s.length() - 1;
            char[] chars = s.toCharArray();
            while (i < j) {
                char temp = chars[i];
                chars[i++] = chars[j];
                chars[j--] = temp;
            }
            return new String(chars);
        }
    }
}

@@ -33,171 +33,8 @@
 s;%0A%0A
-/**%0A * 344. Reverse String%0A *%0A * Write a function that takes a string as input and returns the string reversed.%0A%0A Example:%0A Given s = %22hello%22, return %22olleh%22.%0A */%0A
 publ

refactor 344