02.Check if Two Integers are Anagrams
EasyMath// Mission briefing
Given two integers, determine if they are anagrams of each other. Two integers are anagrams if they contain the same digits with the same frequency, but possibly in a different order.
The function should return true if the integers are anagrams, and false otherwise.
// Constraints
-10^9 ≤ x, y ≤ 10^9
Time limit: 1s · Memory limit: 256 MB
Hint 1
Consider converting the integers to strings and sorting them.
Hint 2
You can also use a frequency counter to compare the digits.
Hint 3
Remember to handle negative signs appropriately.