A Beginner’s Guide to the Linked List Data Structure

Data structures

  1. Linear: arrays, lists
  2. Tree: binary, heaps, space partitioning etc.
  3. Hash: distributed hash table, hash tree etc.
  4. Graphs: decision, directed, acyclic etc.
import logginglogging.debug(arr[2]); // output: C
# Node class
class Node:
# Function to initialize the node object
def __init__(self, data):
self.data = data # Assign data
self.next = None # Initialize next as null
# Linked List class
class LinkedList:

# Function to initialize the Linked List object
def __init__(self):
self.head = None

Pros and Cons of Using Linked Lists

References

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Trello vs Jira: Which Project Management System Will Work Best in 2019?

Python for Geosciences: Spectral Analysis (step by step)

DS & Algo Problems — ML Coding

How to autopilot customer services using Collect.chat on your website

22–2 Built-in Python Libraries You Didn’t Know Existed | P(Guarantee) = .8

From Dapp Zero to Hero in 1 Week.

OSRM data generation and deployment

PATH (MacOS) : Best practice for PATH Environment Variables On Mac OS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ibrahim Khalilov

Ibrahim Khalilov

More from Medium

KNY B.C. 2566: 3 provinces within 4 days

#3. Billy Bottom

Click…click…click…

Functions