r/PythonLearning • • May 03 '26

linked list python from scratch (D.S.A)

210 Upvotes

4 comments sorted by

3

u/Adrewmc May 03 '26

Cool now implement slicing.

2

u/Sudden-Bill2447 May 07 '26

That is really cool tbh but I find your impplementation of clear_tail a bit weird. What did you intended to do in the clear_tail function?

0

u/[deleted] May 04 '26

[deleted]

2

u/Sudden-Bill2447 May 07 '26

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.