Given two integers x1 and x2, return true if the numbers written with no leading zeros contain the same digits. That is, the string representation of one number is a permutation of the string representation of the other.
For example
x1 = 1234; x2 = 4321; tf = same_digits(x1,x2)
would output
tf = true
whereas
x1 = 1234; x2 = 1244; tf = same_digits(x1,x2)
would output
tf = false
May you add some testcases concerning that ~mod(63-45,9) = true, but 63 and 45 has definitely not the same digits.
263 Solvers
156 Solvers
145 Solvers
The sum of the numbers in the vector
342 Solvers
309 Solvers