01
~/data-structures-algorithms

Dynamic Connectivity Problem

What is Dynamic Connectivity? In computing and graph, a dynamic connectivity structure is a data structure that dynamically maintains information about the connected components of graph. Dynamic Connectivity Problem Given a set of N obj…

Dynamic Connectivity Problem
02
~/data-structures-algorithms

Removing nth Node From End of Linked List

The most basic approach to this problem would be to iterate over the entire linked list once to find out the length of the list. Then iterate over it again to locate the node to be removed. This can be done in the following way: Let n b…

Remove nth Node from Linked List in java
03
~/data-structures-algorithms

Reversing a Linked List

If we had to reverse the elements of an array we would have to iterate over then entire array and swap the ith element with the (n-i-1)th element where n is the size of the array. Now in a linked list we are not required to swap the dat…

ll_rev_2
04
~/data-structures-algorithms

Linked Lists

Linked lists are linear data structures, which consist of nodes. These nodes store data in them as well as point to the next node in the list. So each node in the list has 2 attributes, one of the datatype you are trying to store which…

linkedlist