Your mission is to define a LinkedList class so that you can:
>>> list1 = LinkedList() >>> list1 [] >>> list.length() 0 >>> list1.append(23) >>> list1 [23] >>> list1.get(0) 23 >>> list1.append(100) >>> list1.get(1) 100 >>> list1.append(78) >>> list1.append(15) >>> list1 [23, 100, 78, 15] >>> list.length() 4 >>> list1.remove(1) # removes 2nd item 100 >>> list1 >>> [23, 78, 15] >>> list.length() 3
The only constraint is that you can't use a Python list.
You may work in teams of two for this assignment. Each team should turn it:
Bonus:
Make your code so that you can delete the first item in a list:
>>> list1 = LinkedList() >>> list1.append(23) >>> list1.append(100) >>> list1.append(78) >>> list1.append(15) >>> list1 [23, 100, 78, 15] >>> list.remove(0) 23 >>> list1 [100, 78, 15]