@@ -0,0 +1,1338 @@
+import org.junit.Test;%0A%0Aimport java.util.Arrays;%0Aimport java.util.HashSet;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0Apublic class IsSubsetTest %7B%0A%0A    /*%0A     Is subset?%0A%0A     Input:%0A       %22Television%22%0A       %22even%22%0A     Output:%0A       True%0A%0A       Implementations:%0A       - O (n * log (n) ) /w binary search%0A       - O (N)            /w hashset%0A     */%0A%0A    @Test%0A    public void isSubset_with_HashSet_Test() %7B%0A        boolean result = false;%0A        String s1 = %22Television%22;%0A        String s2 = %22even%22;%0A%0A        HashSet%3CCharacter%3E map = new HashSet%3C%3E(s1.length());%0A%0A        // O(n)%0A        for (int i = 0; i %3C s1.length(); i++) %7B%0A            map.add(s1.charAt(i));%0A        %7D%0A%0A        // O(m)%0A        for (int i = 0; i %3C s2.length(); i++) %7B%0A            //contains O(1)%0A            result = map.contains(s2.charAt(i));%0A        %7D%0A%0A        assertThat(result).isEqualTo(true);%0A    %7D%0A%0A    @Test%0A    public void isSubset_with_binarySearch_Test() %7B%0A        boolean result = false;%0A        String s1 = %22Television%22;%0A        String s2 = %22even%22;%0A%0A        char%5B%5D s1Array = s1.toCharArray();%0A%0A        Arrays.sort(s1Array);%0A%0A        //O( n*log(n) )%0A%0A        for (int i = 0; i %3C s2.length(); i++) %7B%0A            result = Arrays.binarySearch(s1Array, s2.charAt(i)) %3E 0;%0A        %7D%0A%0A        assertThat(result).isEqualTo(true);%0A    %7D%0A%0A%7D%0A

add simple isSubset test