## Welcome to Interviewbit, help us create the best experience for you!

Currently, You are a:

College/University *
Enter the name of your college
Branch *
Year of completion *

College/University *
Enter the name of your college
Branch *
Year of completion *

Current Company *
Enter company name
Experience *

## You're all set!

Full name *
Email *

By creating an account, I acknowledge that I have read and agree to InterviewBitâ€™s Terms and Privacy Policy .

## Welcome back!

Email *

### Level 4

A linked list is a linear data structure where each element is a separate object.
Linked list elements are not stored at contiguous location; the elements are linked using pointers.

Each node of a list is made up of two items - the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list. It should be noted that head is not a separate node, but the reference to the first node. If the list is empty then the head is a null reference.

##### An example of a linked list node with an integer data.
``````// Linked list example in C/C++
struct ListNode
{
int val;
struct ListNode *next;
};``````
``````// Linked list example in Java
class ListNode
{

// Node class
class Node
{
int val;
Node next;

// Constructor to create a new node
Node(int v) {
val = v;
}
}
}``````
``````# Linked list example in Python
# Node class
class Node:
# Function to initialize the node object
def __init__(self, v):
self.val = v  # Assign value
self.next = None  # Initialize next as null

class ListNode:
# Function to initialize the Linked List
def __init__(self):

## Serious about Learning Programming ?

Learn this and a lot more with Scaler Academy's industry vetted curriculum which covers Data Structures & Algorithms in depth.
Examples

List sort
Problem Score Companies Time Status
Sort Binary Linked List 200 32:15
Partition List 275
49:36
Insertion Sort List 300
49:16
Sort List 350
59:25
List 2 pointer
Pointer move
Problem Score Companies Time Status
K reverse linked list 200 60:30
Even Reverse 200 41:55
Swap List Nodes in pairs 350 33:34
Rotate List 350 33:58
List trick
Problem Score Companies Time Status
Kth Node From Middle 200 28:51
Reverse Alternate K Nodes 300 49:15
Reverse Link List II 450 57:24
Reorder List 600 57:10
List math
Problem Score Companies Time Status
Add Two Numbers as Lists 250 43:07
List Cycle 600 39:15