Bloomberg interview question

find the longest repeating char in a sorted string

Interview Answer

Anonymous

29 June 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; }