Kotlin Program:

- To check string is Palindrome or not

Example:

User Input: "aabbaa"

Output: Palindrome String

s1=input("Enter your string : ")
reverse = ""
l=len(s1)-1
while l!=-1 :
  reverse+=s1[l]
  l-=1

if s1==reverse :
  print("Palindrome String")
else :
  print("Not a Palindrome String")

Output:

  Enter Your string : noon
  Palindrome String
Program
string

You must know first,

Palindrome String : if a string & reverse of it are equal then the string is Palindrome string

Example :

String: "aba" & its Reverse = "aba" . so it's Palindrome
String: "abc" & its Reverse = "cba" . so it's NOT a Palindrome

//reverse the string
int l=s1.length-1;
while(l!=-1) {
  reverse+=s1[l--];
}

//check for the Palindrome
if s1==reverse :
Concept

Coming Soon !

Quick
Tutorial

Quote

Find a place inside where there’s joy, and the joy will burn out the pain.