+ 41
Challenge:: palindrome words
A palindrome is a word that reads the same backward or forward. For example, isPalindrome("Deleveled") should return true as character case should be ignored, resulting in"deleveled", which is a palindrome since it reads the same backward and forward. write your own program to check if a word is palindrome and return true otherwise return false. https://code.sololearn.com/cGMvKT0RoMVf/?ref=app
119 odpowiedzi
+ 48
//after a long time ☺
https://code.sololearn.com/cVyVi5OM4X51/?ref=app
+ 38
https://code.sololearn.com/cfYbxZH82Zxx/?ref=app
+ 28
This code can even check for MORE THAN ONE PALINDROME WORDS
All you need to do is enter all the palindrome words separated by "," .
https://code.sololearn.com/cHDaBl0ZxNkg/?ref=app
+ 28
https://code.sololearn.com/cW53pA4P9q3g/?ref=app
+ 27
Today I started to learn AngularJS ... and here's my first code in it... 😊
https://code.sololearn.com/WYd5Bgyl31K4/?ref=app
+ 25
+ 16
Using StringBuffer
https://code.sololearn.com/cBT2d0ZuyV1d/?ref=app
+ 15
1) Standard
s = prompt('').toLowerCase()
alert(s === s.split('').reverse().join(''))
2) Without "reverse()"
var s = prompt('').toLowerCase(), s_r = ""
for(i = s.length - 1; i >= 0; i--) s_r += s[i]
alert(s == s_r)
3) Prototype implementation
https://code.sololearn.com/W3JbmpgnvbKl/?ref=app
4) Recursion
https://code.sololearn.com/WFz0Uzk3lc5k/?ref=app
+ 14
@Ace It will be better if you move your code to code playground ☺ thanks
+ 14
My late attempt
https://code.sololearn.com/cnd0h6ylTK14/?ref=app
+ 13
Here's My Implementation In Java
https://code.sololearn.com/cveZTD9icp1s/?ref=app
+ 13
https://code.sololearn.com/c5RXS8uy089I/?ref=app
+ 12
There are other ways in Python too:
One more by me using recursion:
https://code.sololearn.com/cfV98sCJuKOY/?ref=app
+ 12
show us your code on playground @sayan
+ 12
here is mine in JS https://code.sololearn.com/WpbOkxJE38uu/?ref=app
+ 11
https://code.sololearn.com/cMZ20HhEp1C6/?ref=app
+ 10
a=input().lower();print("Palindrome!") if a==a[::-1] else print("Not a palindrome!")
+ 10
https://code.sololearn.com/cCMXTaTdVdr9/?ref=app
My code is lil different. You enter a non palindrome word it. It actually converts it into a palindrome word. try it guys....