OAT || Return the element with maximum occurence of a digit "a"
Anonymous User
254

Supposedly, we are given an array of integers and a digit "a".
We want to return the array element with maximum occurence of that digit.

For eg. a = 3
arr = [33, 23 , 2 ,3 , 12, 123]
It should return "33" because "3" appears two times[ which is maximum]
In case there is no occurence of this digit, we have to return 0

So , how do we go about this problem? Python is not allowed.

Comments (2)