Given a number N. check whether a given number N is palindrome or not in it's both formates (Decimal and Binary ).
Input: N = 7 Output: "Yes" Explanation: 7 is palindrome in it's decimal and also in it's binary (111).So answer is "Yes".
Input: N = 12 Output: "No" Explanation: 12 is not palindrome in it's decimal and also in it's binary (1100).So answer is "No".
You don't need to read input or print anything. Complete the function isDeciBinPalin() which takes N as input parameter and returns "Yes" if N is a palindrome in its both formates else returns "No".
Expected Time Complexity: O(logN)
Expected Auxiliary Space: O(1)
1<= N <=107
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?Yes