Python3_Data_Structures icon indicating copy to clipboard operation
Python3_Data_Structures copied to clipboard

Every operation taking O(n) time in Linked Lists

Open deshwalmahesh opened this issue 3 years ago • 1 comments

hi, I think there's a difference between your implementation and the theoratical aspect of Linked List. Deletion and Insertion must take O(n) time where you are looping in O(n) time

deshwalmahesh avatar Apr 15 '22 20:04 deshwalmahesh

Hi @deshwalmahesh, what you've pointed out is correct. This implementation is inefficient in that sense, but I don't want to change it here and cause confusion between the code in the video tutorial vs. what's stored in the repo.

bfaure avatar Apr 29 '23 14:04 bfaure