Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a function that returns true if a given number is a palindrome.

Medium

Problem Statement

Write a function that returns true if a given number is a palindrome.

Sample Input

num = 121

Sample Output

true

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
// Check if a number is a palindrome function isPalindrome(num) { } console.log(isPalindrome(121));
Log in or sign up to run or submit your code.Log inSign up
Input
num = 121
Expected Output
true