Description
Java program to implement, manipulate and applications using linked lists.
Insertion:
Insert at the beginning.
Insert at the end.
Insert at a specific position.
Insert after a specific node.
Insert before a specific node.
Deletion:
Delete from the beginning.
Delete from the end.
Delete a specific element by value.
Delete a specific element by position.
Traversal and Display:
Traverse and print the elements in the linked list.
Reverse and print the elements in the linked list.
Search and Access:
Search for an element by value.
Access an element by position.
Length and Counting:
Find the length (number of nodes) of the linked list.
Count the occurrences of a specific value in the list.
Sorting and Merging:
Sort the linked list (best sort).
Concatenation:
Concatenate (combine) two linked lists together.
Duplicate Removal:
Remove duplicate elements from a linked list.
Polynomial Representation:
Implement polynomial addition and multiplication using linked lists.
Note: Code snippet for your reference
class Node { int data;
Node next; public Node(int data) { this.data = data;
this.next = null;
}
}
class LinkedList { Node head; public LinkedList() {
head = null;
}
public void insertAtBeginning(int data) {} public void insertAtEnd(int data) {}
public void insertAtPosition(int data, int position) {}




Reviews
There are no reviews yet.