## Bubble Sort for Linked List by Swapping nodes

Given a singly linked list, sort it using bubble sort by swapping nodes. Example: Input: 10->30->20->5 Output: 5->10->20->30 Input: 20->4->3 Output: 3->4->20 Recommended: Please try… Read More »

Given a singly linked list, sort it using bubble sort by swapping nodes. Example: Input: 10->30->20->5 Output: 5->10->20->30 Input: 20->4->3 Output: 3->4->20 Recommended: Please try… Read More »

Given a Linked List and a key K. The task is to write a program to delete all the nodes from the list that are… Read More »

Pre-requisite: Convert an Array to a Circular Doubly Linked List, Doubly Circular Linked List Given a Doubly circular linked list. The task is to find… Read More »

Given a Linked List of integers. The task is to write a program to modify the linked list such that all even numbers appear before… Read More »

Prerequisite: Insert Element Circular Doubly Linked List. Convert an Array to a Circular Doubly Linked List. Given the start pointer pointing to the start of… Read More »

Prerequisite: Doubly Linked list, Circular Linked List, Circular Doubly Linked List Given an array of N elements. The task is to write a program to… Read More »

Given a linked list of alphabets and special characters. Reverse the given linked list without affecting the position of the special characters. Examples: Input: g… Read More »

Given a binary tree, flatten it into a linked list. After flattening, the left of each node should point to NULL and right should contain… Read More »

Given head of a linked list of integers and an integer k, your task is to modify the linked list as follows: Consider nodes in… Read More »

Given a matrix, the task is to construct a linked list matrix in which each node is connected to its right and down node. Example:… Read More »

Given a linked list, rearrange it such that converted list should be of the form a < b > c < d > e <… Read More »

Given a linked list of characters. The task is to find the maximum occurring character in the linked list. if their are multiple answer return… Read More »

This post explains the iterative approach of this problem. We maintain two pointers, prev and temp. If these two have either x or y same,… Read More »

Java’s Linked list class offers a function that allows a “Queue Based” working called poll(). This function not only returns deletes the first element, but… Read More »

Linked list library also offers to depict the first and last index of element that has to be found using the indexOf() and lastIndexOf() functions… Read More »