LinkedList.add_back
Adds an item to the back of the Linked List
Usage
addBack(item:Any)
Parameters:
item : element
The new element will be added to the back of the Linked List.
Returns:
LinkedList
Returns the same Linked List containing the newly added item.
Example
from jellybeans.structures import LinkedListLL1 = LinkedList()LL1.add_back(4).add_back(3).add_back(2).add_back(1)print(LL1) # 4 => 3 => 2 => 1LL2 = LinkedList([5, 6, 7])LL2.add_back(109)print(LL2) # 5 => 6 => 7 => 109