Create linked list and add node at the beginning class node: def __init__(self, p_data): self.data=p_data self.next=None class[…]
Read moreCategory: Python
Python: Find Whether A String Could be Palindrome or Not
str=”amalaylam” flag=0 for i, c in enumerate(str): print (i,c,ascii(c),str.count(c)) if (str.count(c))%2 != 0: flag=flag+1; if flag>1:[…]
Read moreData Structure and Algorithm Interview Questions With Python
Find whether a string could be palindrome or not? Linked list creation with add node at the beginning Linked list[…]
Read more