Maximum Repeating Number Leetcode Javascript Problems