Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check if a string is palindrome or not using two pointer function in python

l = "I am AkiraChix"
left = 0 
right = len(l) - 1
while left < right:
    if l[left] != l[right]:
        print("False")
    else:
        left += 1        
        right -= 1
print("True")
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #check #string #palindrome #pointer #function #python
ADD COMMENT
Topic
Name
4+5 =