Algorithm - Next Smallest Palindrome (Explanation + Code)

preview_player
Показать описание
Given a whole number, we compute the next smallest palindrome occuring after the given number.

Рекомендации по теме
Комментарии
Автор

Very good explanation

Keep uploading such videos

AmmarShaikh-pemc
Автор

you made this too easy, thanks a lot.

AmazingWorld-fwoc
Автор

Today i got this question in my interview and i couldnt solve it using javascript so was surfing through youtube for answers and found this thanks nithin for great explanation but still dont know how to split the number as u mentioned in split array :)

vignesh
Автор

(Y) really good content road to 50k confirmed

okokok
Автор

This is a good solution but will fail for very large numbers. A better approach would be to iterate from the middle of a number by taking two pointers i and j and you can generate the next larger palindrome.

anilpank