Card image cap
Reverse a linked list - JavaScript

A linked list is a linear data structure where each element is a separate object. Each element (we will call it a node) of a list is comprising of two items - the data and a reference to the next node. Implementation of Reverse a linked list in JavaScript is given here.

Card image cap
Python Program to Reverse a Singly Linked List

Python program to reverse a singly linked list is given below along with the output. Linked List questions are so often to be asked in the interviews of many tech giants.

Card image cap
C++ Program to detect a loop in singly Linked List

Algorithm and the program for detecting any loop inside the singly Linked linked list is given below.
Implementation is simple we will use two pointer. We will increment one pointer by one the other one by two and then check if two pointers are equal or not.

Card image cap
Python Program for Insertion at any position in Singly Linked List

Python program for insertion node at any position in singly linked list is given below. In this program the class LinkedList contains a method insert which will insert the new element at the desired position the program along with output is given.

Card image cap
Program for Insertion and Deletion at the beginning of Singly Linked List in Python

python program for the insertion and deletion operation at the beginning of singly linked list is given below. In this program we have two method. insert_at_beg() to insert the element in the beginning and delete_at_beg() to delete the element at the beginning of the linked list.

Card image cap
Python Program to create a Singly Linked List
Python program is given below to create a singly Linked List. This program contains two classes first is class Node and the second is class LinkedList, Both the classes are discussed below.

Node Class:

Card image cap
C Program to Print a Linked List in Reverse Order

C Program tp print the elements of a Linked List along with ouput is given below.

Card image cap
C++ Program to reverse a Linked List in Group Size

C++ Implementation to reverse a linked list in the group size. This program has been already asked in the interviews of many tech giants such as Microsoft, Adobe etc..

Card image cap
C Program to increment a number by 1 represented by Linked List in O(n) time.

In this question, a number which is represented by Linked List is given to you. You have to increment the number by 1 and the number must remain in the form of Linked List.

Card image cap
C Program for deletion of a node from any position in doubly Linked List

Doubly Linked List is a variation of Linked List in which traversal is possible in both directions, forward and backward. Doubly Linked List have two fields one is data field and other is link fields. Link fields itself contain two pointers, next and prev.