R1: Write a code in Python to check whether a string is palindrome or not without reversing the string.
Anonymous
written in time complexity 0(n) string = input('Enter a string:') string_length = len(string) for index in range(string_length//2): if string[index] != string[string_length-index-1]: print('Not Palindrome') break else: print('Palindrome')
Check out your Company Bowl for anonymous work chats.