Tags » Linked List

Doubly Linked List

Doubly Linked List (DLL) contains an extra pointer, typically called previous pointer, together with next pointer and data which are there in singly linked list. 572 more words

Data Structure

Reverse a linked list

Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by changing links between nodes. 269 more words

Data Structure

Bubble sort in Array and linked list

Bubble Sort

Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.

First Pass: 377 more words

Data Structure

Linked list

Linked list :

a linear data structure. Unlike arrays, linked list elements are not stored at contiguous location; the elements are linked using pointers.

Advantage of liked list : 711 more words

Data Structure

Find the middle of a given linked list in Java

Given a singly linked list, find middle of the linked list. For example, if given linked list is 1->2->3->4->5 then output should be 3.

If there are even nodes, then there would be two middle nodes, we need to print second middle element. 697 more words

Core Java

Priority Queues

A priority queue is like a regular queue only it has one extra method


This method returns the highest priority item in the queue, and it’s useful for things like sorting when used in conjunction with binary trees. 126 more words


Linked List Basic Operations

It has been a while since I have done any work with linked lists. In my day-to-day programming I rarely come across the linked list data structure. 1,119 more words