Double Linked List Algorithm
For this week I decided to take a break from Python and work on an Algorithm in Java called Double Linked List. A DLL is a data structure used to sort data and retrieve data. It is very common in the work place and is a common data structure asked to get built in developer interviews. For this week I decided to work on 2 methods. The add first and the add last methods. In a double linked list there is always 2 nodes. The head and the tail. The head is where the data structure begins and the tail is where it ends. If there is no data in my list then they both point to null (empty). That is why in my empty constructor I initialized both the head and tail to point to null. After we initialize the head and tail and make them both point to null I declared my first method which is add first. This is when you want to add a new piece of data to the beginning of your list. This is useful because if you know what data is in the beginning of your list you wont have to traverse through y