Python3_Data_Structures icon indicating copy to clipboard operation
Python3_Data_Structures copied to clipboard

Code from Youtube Tutorial Series

Results 4 Python3_Data_Structures issues
Sort by recently updated
recently updated
newest added

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

Hi, I think the right method in line 204 should be "_delete_node()" because the method self.delete_node() doesn't take a Node object as a parameter. https://github.com/bfaure/Python3_Data_Structures/blob/8ceac35470f6740b7cb25af0ba94622099e3dab7/AVL_Tree/main.py#L204

* Operators '!=' and '==' call the ' __eq__' method of a class which can give unwanted results. * Better way is to use is and is not instead of...

Your linked_list.lenght has a bug for list of size 1. Also, your get calls length which does an extra O(n) iteration just to check if index is valid.