+ 15
[ASSIGNMENT] Nearest Palindrome
For a give number n,write a code to find the nearest or the next smallest palindrome larger than this number. E.g: If input is "1234" the output should be "1331" if input is "999" the output should be "1001"
27 Answers
+ 19
ASSIGNMENT OF MITALI
https://code.sololearn.com/cGb8F34mWKS7/?ref=app
+ 14
Burglarian Fox
Here's, two codes.
First : on beginners way.
Second: translation of Kotlin's code
https://code.sololearn.com/cyBKjMptrG35/?ref=app
https://code.sololearn.com/c1xPL7L1XngY/?ref=app
+ 13
Burglarian Fox
You're welcome 😉
+ 11
mitali jadhavrao
Thank you 😉
+ 10
Here's my attempt on the challenge. Thanks for the idea : )
https://code.sololearn.com/cI5MLAQIPlm8/?ref=app
+ 9
https://code.sololearn.com/WU4crURsgvzT/?ref=app
https://code.sololearn.com/cvGEFoFZsULN/?ref=app
+ 9
mitali jadhavrao
Do we need to find the nearest or next smallest palindrome number?
Example :
Input: 1234
Nearest : 1221
Next smallest : 1331
+ 7
https://code.sololearn.com/cvu6lxCE8vAw/?ref=app
+ 6
@Vishal Pal
Thanks alot for the suggestion👍
+ 6
I think I did it, it is mainly string manipulation:
https://code.sololearn.com/chExBrG8Gpzo/?ref=app
+ 6
@Ipang Yes I have submitted this challenge in lesson Factory.I hope they will make this an assignment. 😊
+ 5
Great
Thanks alot @paul and @Ipang for taking part🙂
+ 5
@Mitali, Thanks, and you're welcome, so have you submitted this challenge in Lesson Factory yet (as @Vishal suggested), I guess it would be fun to see it in assignment list later : )
+ 4
Alright, I hope so too @Mitali, best of luck then... : )
+ 4
Abhimanyu Great code.
Thanks for taking part👍
+ 3
nice one
+ 3
VISHAL SRIVASTAVA both the codes are equally good.
Thanks for taking part.👍
+ 3
LukArToDo You have coded for both the cases 👍
Good one.