Retired

Numerical Palindrome #5 (retired)

464 of 1,001kkavita92

Description:

A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward as forward. Examples of numerical palindromes are:

  • 232
  • 110011
  • 54322345

Complete the function to test if the given number (num) can be rearranged to form a numerical palindrome or not. Return a boolean (true if it can be rearranged to a palindrome, and false if it cannot). Return "Not valid" if the input is not an integer or is less than 0.

For this kata, single digit numbers are NOT considered numerical palindromes.

Examples

5        =>  false
2121     =>  true
1331     =>  true 
3357665  =>  true 
1294     =>  false 
"109982" =>  "Not valid"
-42      =>  "Not valid"

Other Kata in this Series:

Numerical Palindrome #1
Numerical Palindrome #1.5
Numerical Palindrome #2
Numerical Palindrome #3
Numerical Palindrome #3.5
Numerical Palindrome #4
Numerical Palindrome #5

Fundamentals

Stats:

CreatedApr 3, 2017
Warriors Trained2128
Total Skips47
Total Code Submissions7369
Total Times Completed1001
JavaScript Completions464
Ruby Completions98
Python Completions473
COBOL Completions3
Total Stars36
% of votes with a positive feedback rating93% of 253
Total "Very Satisfied" Votes220
Total "Somewhat Satisfied" Votes29
Total "Not Satisfied" Votes4
Total Rank Assessments10
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • kkavita92 Avatar
  • anter69 Avatar
  • docgunthrop Avatar
  • JohanWiltink Avatar
  • tachyonlabs Avatar
  • bestwebua Avatar
  • akar-0 Avatar
  • dfhwze Avatar
Ad