Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 4
Program to implement stack operations (Push, Pop, Display) on a stack using linked lists.
Help me finish this program to implement stack operations (Push, Pop, Display) on a stack using linked lists. So far the program only performs Push operation, Pop operation and notifies the user what element has been Popped. Help me create a function to display the elements in the stack. Code link is below; https://code.sololearn.com/cb5jPG5n4P6m/?ref=app Sample of how to input data can be found on the following url: https://ibb.co/PgJPsSd
2 Réponses
+ 1
def display(self):
while self.head:
print(self.head.data)
self.head = self.head.next
+ 4
Hey Jayakrishna🇮🇳 , sorry for the late response. Let me work on the code ASAP.