/**
 * @Company Google
 *
 * Given two string arrays, A and B, return an array of length B where each value at index i corresponds to the number of strings
 * in A that are less than the string in B at index i. The string comparator is defined as follows:
 * 
 * String A is greater than String B if the first lexicographical order character in A is more frequent than the first lexicographical order in B.
 * The lexicographical is the ordering of the alphabet.
 *
 * Ex. 'aabbbccc' is greater than 'bcccc' since there are 2 a's vs 1 b
 *     'aaa' is less than 'cc' since there are 3 a's vs 2 c's
 *
 * Problem Ex.
 *   Input: [ 'abc', 'aab', 'aaa' ], [ 'aazz', 'abc', 'aaaaaaa' ]
 *   Output: [ 1, 0, 3 ]
 *
 *   'aazz' has a value of 2 which is greater than 'abc'
 *   'abc' has a value of 1 which is greater than nothing in array A
 *   'aaaaaaa' has a value of 7 which is greater than 'abc', 'aab', 'aaa'
 */
public int[] numOfLargerStrings(String[] a, String[] b) { }

@@ -966,10 +966,989 @@
 %5B%5D b) %7B 
+%0A  String%5B%5D aStrs = a.split(%22%5C%5Cs%22);%0A  String%5B%5D bStrs = b.split(%22%5C%5Cs%22);%0A  int%5B%5D values = new int%5BaStrs.length%5D;%0A  int%5B%5D result = new int%5BbStrs.length%5D;%0A  int i = 0;%0A%0A  // Count the frequency value for each string.%0A  while (i %3C aStrs.length %7C%7C i %3C bStrs.length) %7B%0A    if (i %3C aStrs.length) values%5Bi%5D = lexicographicalValue(aStrs%5Bi%5D);%0A    if (i %3C bStrs.length) result%5Bi%5D = lexicographicalValue(bStrs%5Bi%5D);%0A    i ++;%0A  %7D%0A%0A  // Count the number of strings in a that are less than the string in b.%0A  for (int j = 0; j %3C bStrs.length; j ++) %7B%0A    int count = 0;%0A    for (int k = 0; k %3C aStrs.length; k ++) %7B%0A      if (aStrs%5Bk%5D %3C bStrs%5Bj%5D) count++;%0A    %7D%0A    result%5Bi%5D = count;%0A  %7D%0A%0A  return result;%0A%7D%0A%0A/**%0A * Helper function to count the lexicographical value of the string.%0A */%0Apublic int lexicographicalValue(String str) %7B%0A  char%5B%5D arr = str.toCharArray();%0A  Arrays.sort(arr);%0A  int count = 0;%0A  for (char c : arr) %7B%0A    if (c == arr%5B0%5D) count ++;%0A    else break;%0A  %7D%0A%0A  return count;%0A
 %7D%0A

Fix typo