Function to return the maximum possible time in 24 - Hours format
static String getMaxTime ( int arr [ ] ) { HashMap < Integer , Integer > hashMap = getFrequencyMap ( arr ) ; int i ; boolean flag ; String time = " " ; flag = false ;