3783. Mirror Distance of an Integer
You are given an integer
n.Define its mirror distance as:
abs(n - reverse(n)) wherereverse(n)is the integer formed by reversing the digits ofn.Return an integer denoting the mirror distance of
n.
abs(x)denotes the absolute value ofx.
1 | class Solution { |