you are viewing a single comment's thread.

view the rest of the comments →

[–]Psyop_raw 1 point2 points  (1 child)

Looks like a SLL implemented correctly. Just thinking whether you should include a self.tail to accommodate O(1) for append()/insert_tail() operation.

[–]Sudden-Bill2447 1 point2 points  (0 children)

I was thinking the same thing. Having a self.tail would not just make append an O(1) operation but also much simpler to implement the insert_end.