Ad
  • Custom User Avatar

    You are using different keys to find the largest number with equally highest frequency in the list. This results in previous comparison on non-largest number being stored in key2 despite there is only one most frequent appearing number in the list.