Help in problem

Правка en3, от __Tanzeel__, 2021-12-22 08:22:13

Yesterday there was a online test of some website (GeeksforGeeks) where I encountered the below problem, I was not successful in getting AC for the problem because of TLE issue, it will be very helpful if someone can share the approach or give hints to solve the problem ,below I am attaching the problem statement. My time complexity of the solution was O(N.x) where 'x' is the frequency of maximum element of the given array.    Any help will be appreciated.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский __Tanzeel__ 2021-12-22 08:22:13 3 Tiny change: ' very help if someon' -> ' very helpful if someon'
en2 Английский __Tanzeel__ 2021-12-22 08:20:24 5 Tiny change: 'Any help would be apprec' -> 'Any help will be apprec'
en1 Английский __Tanzeel__ 2021-12-22 08:14:11 692 Initial revision (published)