why can’t we use a map and take the counts?
and print the elements which are greater than n/3
Solve using maps
hello @rkrrockstar89
that is also correct. but it will have time complexity O(n).
to solve it in O(1) space complexity we r follwinng that alorithm (taught in video lecture)