I created a class called LinkedList and a method inside this class called find().
I'm trying to call this method inside a function but it always return the following error:
Traceback (most recent call last):
File "main.py", line 44, in <module>
BinaryInsertionSort(l.head, l.length())
File "main.py", line 26, in BinaryInsertionSort
item = list.find(i).data
AttributeError: 'Node' object has no attribute 'find'
I have another class called Node, but I don't think this would influence anything.
Please, someone help me! I don't know what is wrong....
Here is the link for the entire code: https://repl.it/@Mimik1/InsertionSortWithLinkedList#main.py
It's for a university project so I can't change the Binary Insertion sort at all, but if it is wrong, please tell me.
BinaryInsertionSort(l, l.length())list(although it sounds like you didn't write that part of the code). This will eventually cause problems, or at the very least, confusion.