This repository contains a complete implementation of a Doubly Linked List in Java using both head and tail pointers. All major operations such as insertion, deletion, traversal, and searching are implemented from scratch β without using any Java library collections.
pushFront(int data)β Insert at the beginningpushBack(int data)β Insert at the endinsertAtIndex(int data, int position)β Insert at a specific indexpopFront()β Remove element from the frontpopBack()β Remove element from the enddeleteAtIndex(int index)β Delete node at a specific indexdeleteThroughdata(int data)β Delete first node with a specific valueisEmpty()β Check if the list is emptyprint()β Print the list from head to tail
This project is part of my DSA (Data Structures & Algorithms) practice to master:
- Bidirectional node linking
- Pointer manipulation (next & prev)
- Special case handling (insertion/deletion at head, tail, or only node)
- Dynamic memory and structure control
Nodeβ Doubly linked node withdata,prev, andnextdoublyLLβ Class implementing the doubly linked list logicMainβ Sample test cases and operations
-
Java
-
IDE: IntelliJ IDEA
Noor Fatima
BS Artificial Intelligence Student
GitHub: https://github.com/noor05-creator