Login and get codingGiven an integer number, find the most frequent digit in it.
Examples:
- 1998 -> two 9's, one 1, one 8 so return 9
- 177 -> return 7
- 2020 -> there is 2 two's, 2 zero's. Return 2 = the first highest hitter
- 12345 -> all digits occur once, so like the last example return the first digit = 1
Food for thought: how to count things efficiently?
Have fun and keep calm and code in Python!
464 out of 493 users completed this Bite.
Will you be Pythonista #465 to crack this Bite?
Resolution time: ~32 min. (avg. submissions of 5-240 min.)
Pythonistas rate this Bite 3.0 on a 1-10 difficulty scale.
» You can do it! 😌