You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Sun, Aug 16, 2020, 10:04 AM Aswin Ramakrishnan ***@***.***> wrote:
Hello,
Thanks for the lesson on linked list. I understood it completely.
This should work. Please update.
def insertAtBegin(self, data):
if self.head is None:
node = Node(data, self.head, None)
self.head = node
return
node = Node(data, self.head, None)
node.next = self.head
self.head.prev = node
self.head = node
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#32>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD2RXOAQWWSSA3KGVQU34FLSA7RQFANCNFSM4QA27HEA>
.
Hello,
Thanks for the lesson on linked list. I understood it completely.
This should work. Please update.
def insertAtBegin(self, data):
if self.head is None:
node = Node(data, self.head, None)
self.head = node
return
node = Node(data, self.head, None)
node.next = self.head
self.head.prev = node
self.head = node
The text was updated successfully, but these errors were encountered: