7 kyu

Next Palindromic Number.

1,635 of 3,968raulbc777

Description:

There were and still are many problem in CW about palindrome numbers and palindrome strings. We suposse that you know which kind of numbers they are. If not, you may search about them using your favourite search engine.

In this kata you will be given a positive integer, val and you have to create the function next_pal()(nextPal Javascript) that will output the smallest palindrome number higher than val.

Let's see:

For Python
next_pal(11) == 22

next_pal(188) == 191

next_pal(191) == 202

next_pal(2541) == 2552
For Javascript
nextPal(11) == 22

nextPal(188) == 191

nextPal(191) == 202

nextPal(2541) == 2552
For C#
Kata.NextPal(11) == 22

Kata.NextPal(188) == 191

Kata.NextPal(191) == 202

Kata.NextPal(2541) == 2552
For Ruby
next_pal(11) == 22

next_pal(188) == 191

next_pal(191) == 202

next_pal(2541) == 2552
For CoffeeScript
nextPal(11) == 22

nextPal(188) == 191

nextPal(191) == 202

nextPal(2541) == 2552
For Haskell
nextPal 11 == 22

nextPal 188 == 191

nextPal 191 == 202

nextPal 2541 == 2552
For C++
next_pal(11) == 22

next_pal(188) == 191

next_pal(191) == 202

next_pal(2541) == 2552

You will be receiving values higher than 10, all valid.

Enjoy it!!

Fundamentals
Data Structures
Algorithms
Mathematics
Logic
Strings

Stats:

CreatedJan 26, 2016
PublishedJan 26, 2016
Warriors Trained6534
Total Skips150
Total Code Submissions10119
Total Times Completed3968
Python Completions1635
JavaScript Completions1559
CoffeeScript Completions17
Ruby Completions215
Haskell Completions102
C# Completions234
C++ Completions274
C Completions92
Total Stars82
% of votes with a positive feedback rating91% of 510
Total "Very Satisfied" Votes431
Total "Somewhat Satisfied" Votes69
Total "Not Satisfied" Votes10
Ad
Contributors
  • raulbc777 Avatar
  • GiacomoSorbi Avatar
  • CrazyMerlyn Avatar
  • user5036852 Avatar
  • Voile Avatar
  • rowcased Avatar
  • bidouille Avatar
  • hobovsky Avatar
  • BobtheLantern Avatar
  • 66  Avatar
  • saudiGuy Avatar
Ad