Given a number N, the task is to check if xor value of the frequency of the digits is zero or not.
Input: N = 122233 Output: Yes Frequencies of 1, 2 and 3 are 1, 3, 2 respectively. And Xor of 1, 3 and 2 is 0. Input: N = 123 Output: No
Approach: Count the frequency of all the digits and then iterate over all frequency and xor them if the answer is zero then print Yes else No.
Below is the implementation of the above approach:
- Check if the frequency of all the digits in a number is same
- Check whether product of digits at even places is divisible by sum of digits at odd place of a number
- Check if a number has digits in the given Order
- Check if all digits of a number divide it
- Check if the sum of digits of a number N divides it
- Check if the given decimal number has 0 and 1 digits only
- Check if a number with even number of digits is palindrome or not
- Difference between the summation of numbers whose frequency of all digits are same and different
- Count different numbers possible using all the digits their frequency times
- Program to check if a given number is Lucky (all digits are different)
- Check if a given number can be represented in given a no. of digits in any base
- Check whether sum of digits at odd places of a number is divisible by K
- Check if a given number divides the sum of the factorials of its digits
- Check if the number is even or odd whose digits and base (radix) is given
- Check if a number is magic (Recursive sum of digits is 1)
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.