Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER

Last Updated: Nov 17, 2023
Go to Problems
Complete all the problems in this Topic to unlock a badge
Completed
Go to Problems
Contents

Each node in a list consists of at least three parts:

```    1. Data
2. Pointer to the previous node
3. pointer to the next node```

##### An example of a doubly linked list node with an integer data.
``````// A Doubly Linked list node
{
int val;
};``````
``````// Doubly Linked list class
{

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

// Constructor to create a new node
Node(int v) {
val = v;
}
}
}``````
``````# 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

# Function to initialize the Linked List
def __init__(self):
0/2
Examples

0/4
List sort
0/5
List 2 pointer
0/4
pointer move
0/4
list trick
0/2
List math
Topic Bonus
Bonus will be unlocked after solving min. 1 problem from each bucket

## Video Courses By

View All Courses
Excel at your interview with Masterclasses Know More
Certificate included
What will you Learn?
Free Mock Assessment
Fill up the details for personalised experience.
Phone Number *
OTP will be sent to this number for verification
+91 *
+91
Change Number
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
*Enter the expected year of graduation if you're student
Current Employer
Company Name
College/University Name
Job Title
Job Title
Software Development Engineer (Backend)
Software Development Engineer (Frontend)
Software Development Engineer (Full Stack)
Data Scientist
Android Engineer
iOS Engineer
Devops Engineer
Support Engineer
Research Engineer
Engineering Intern
QA Engineer
Co-founder
SDET
Product Manager
Product Designer
Backend Architect
Program Manager
Release Engineer