Learn practical skills, build real-world projects, and advance your career

Introduction to Python Classes and Linked Lists

Part 2 of "Data Structures and Algorithms in Python"

Data Structures and Algorithms in Python is beginner-friendly introduction to common data structures (linked lists, stacks, queues, graphs) and algorithms (search, sorting, recursion, dynamic programming) in Python, designed to help you prepare for coding interviews and assessments.

Problem

In this notebook, we'll focus our discussion on the following problem:

QUESTION: Write a function to reverse a linked list

Before we answer this question, we need to answer:

  • What do we mean by linked list?
  • How do we create a linked list in Python?
  • How do we store numbers in a linked list?
  • How do we retrieve numbers in a linked list
!pip install jovian --upgrade --quiet
import jovian
jovian.commit()
[jovian] Attempting to save notebook.. [jovian] Updating notebook "proprincekush/python-classes-and-linked-lists" on https://jovian.ai [jovian] Uploading notebook.. [jovian] Uploading additional files... [jovian] Committed successfully! https://jovian.ai/proprincekush/python-classes-and-linked-lists