employer cover photo
employer logo
employer logo

L&T Technology Services

Is this your company?

L&T Technology Services Interview Question

Palindrome

Interview Answers

Anonymous

Feb 25, 2020

Polindrom is nothing but string. input string is reversed we will get same string as output order of the characters also same. Take a string with name 's' and take reversed string of that string 's' os'rev_s' . And apply some of condition like " if s==rev_s: " then the given string is polindrom

1

Anonymous

Mar 31, 2020

Example :- a="malayalam" b=(a[::-1]) if list (a)==list(b) print("This is a polindrom") else: print("This is a not polindrom") output = This is a polindrom

1