Just some Data Structures
Here, we will see the idea of using linked lists (in JAVA 8) and what they are. The main idea behind using linked list over arrays is that the insertion and deletion, here, has time complexity of O(1). The code of using and coding the linked lists is provided here. Following methods and constructs have been covered and coded using Java 8:
- Creating a Node for linked lists.
- The method for basic insertion of element
- Adding elemnent in the start
- Adding element at the last
- Adding element anywhere w.r.t. the index provided.
- Method for deleteion for element at a given index.
- Method for reversing the list
- Method for finding length and printing the list. << More To Add >>