Double Linked List Implementation in JavaTech by Sunny Srinidhi - December 30, 20192 More in The Data Structures series. In the previous post, we saw how we can implement Single Linked List in Java. In this post, we'll see how we can extend that and implement a double linked list. The difference between a Single Linked List (SLL) and a Double Linked List (DLL) is that in DLL we have links to both the previous and the next node in the list. In SLL, we only have a pointer to the next node. So in DLL, we have the advantage of traversing the list in both the forward and reverse direction. This adds a lot more flexibility in the linked list. This ins't very much difficult once we have the SLL implementation done. So let's
Single Linked List Implementation in JavaTech by Sunny Srinidhi - December 23, 2019December 23, 20191 More in The Data Structures series. In the previous post, we saw how a stack can be implemented in Java. But as that was the first data structures post on this blog, I used an ArrayList internally. In this post, we'll implement a simple Linked List in Java. Starting with this post, we'll be getting serious about these data structure implementations. So we'll write 100% custom implementation without using any built-in classes in Java. Also, I'm not going to explain how the data structures work. Which means, in this post, I'll not have illustrations like I had for the stack implementation post explaining each step. So we're going to jump right into the implementation from now on. The Node We know that any linked