Bloomberg Interview Question

find the longest repeating char in a sorted string

Interview Answer

Anonymous

Jun 29, 2016

private static char mostRepeatingCharacter(char[] c) { int count = 0, max = 0; char ch = c[0]; for(int i = 0; i max ? count : max; } return ch; }