#### Loading...

Leaderboard
Showing:
Handle Score
@Ibrahim Nash 5761
@blackshadows 5701
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4944
@saiujwal13083 4506
@sanjay05 3762
@marius_valentin_dragoi 3516
@sushant_a 3459
@verma_ji 3341
@KshamaGupta 3318
Complete Leaderboard
Palindrome in both Decimal and Binary
Basic Accuracy: 0.0% Submissions: 0 Points: 1

Given a number N. check whether a given number N  is palindrome or not in it's both formates (Decimal and Binary ).

Example 1:

Input: N = 7
Output: "Yes"
Explanation: 7 is palindrome in it's decimal
and also in it's binary (111).So answer is "Yes".

Example 2:

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".

Your Task:
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)

Constraints:
1<= N <=107

to report an issue on this page.

### Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

#### My Submissions:

Login to access your submissions.

Palindrome in both Decimal and Binary