package com.github.yaterz.ctci.ci;

import java.util.Arrays;

/**
 * Given two strings, write a method to determine if one is a permutation of the other.
 *
 * I am assuming no exceptions, i.e. case sensitivity, special characters (e.g. spaces) all count
 *
 * @author Matt Yates
 * @since 11/2/14
 */
public class ChapterOneExerciseThreeSolution {
    public static boolean isPermutation( String first, String second ) {
        if ( first == null || second == null ) {
            return false;
        }

        if ( first.length() != second.length() ) {
            return false;
        }

        char[] firstChars = first.toCharArray();
        char[] secondChars = second.toCharArray();

        Arrays.sort( firstChars );
        Arrays.sort( secondChars );

        return Arrays.equals( firstChars, secondChars );
    }
}

@@ -266,18 +266,18 @@
 hor 
-Matt Yates
+mattyaterz
 %0A * 

Fix author