Custom LinkedList
About
1. Data Structure
class Node<E> {
E data;
Node<E> next;
Node<E> prev;
Node(E data) {
this.data = data;
this.next = null;
this.prev = null;
}
}2. LinkedList Class
3. Core Operations
3.1 Add Element at End (addLast)
addLast)3.2 Add Element at Beginning (addFirst)
addFirst)3.3 Remove Element from End (removeLast)
removeLast)3.4 Remove Element from Beginning (removeFirst)
removeFirst)3.5 Get Element at Index (get)
get)3.6 Print LinkedList (printList)
printList)4. Complete Custom LinkedList Implementation
5. Time Complexity Analysis
Operation
Complexity
Last updated