sameFrequency

Write a function called sameFrequency Given two positive integers, find out if the two numbers have the same frequency of digits.

Your solution MUST have the following complexities.

Time: O(N)

sameFrequency(182, 281) // true
sameFrequency(34, 14) // false
sameFrequency(3589578, 5879385) // true
sameFrequency(22, 222) // false

Last updated