Module 3: Object References, Linked Lists and Classes
Module Overview
Module 3 focuses on utilizing linked lists with dictionaries and implementing data structures using object references. You'll learn how to work with linked lists, understand class-based programming in Python, and apply these concepts to build efficient data structures.
This module progresses from fundamental linked list concepts through hands-on implementation, covering class creation, object references, and advanced data structures like stacks and queues that build upon linked list foundations.
Learning Objectives
- Utilize Linked Lists with Dictionaries
Core Competencies
Linked List Intro
Python Class Review
Linked List Classes
Linked List - Part 1 - Understand
Linked List - Part 2 - Plan
Linked List - Part 3 - Execute
Linked List - Part 4 - Reflect
Guided Project
In these guided projects, we'll explore building custom linked list implementations versus Python's built-in list data structure, then advance to more complex data structures built on linked list foundations.
Building Linked Lists vs Python Lists
This project focuses on understanding the fundamental differences between linked lists and Python's built-in list structure, helping you choose the right data structure for specific use cases.
Advanced Data Structures: Stacks and Queues
This project continues with linked list applications and explores how to implement stacks and queues using linked list principles, essential data structures for many algorithms.
Module Assignment
To reinforce your understanding of linked lists, object references, and data structure implementation and prepare for technical assessments, complete the following activities:
LeetCode Practice
For this sprint, we'll be using LeetCode to practice our problem-solving skills. You should already have a LeetCode account from Sprint 4.
Assignment Tasks
- Log in to your LeetCode account
- Attempt at least 10 problems on your own, focusing on linked list manipulation, stack and queue operations, and object reference handling
- Complete at least 5 problems from the recommended list below
- Start with problems that involve linked lists, stacks, queues, and data structure design
- For each problem:
- Apply the four-step problem-solving framework
- Document your thought process for each step
- Implement your solution and test it with the provided test cases
- After solving, review the Discussion section to see different approaches
- Analyze the time and space complexity of your solution
- Focus on understanding the problem thoroughly before implementing a solution
- Reflect on which steps of the framework were most challenging for you
- Practice explaining your approach as if you were in a technical interview
Recommended LeetCode Problems
The following medium and hard difficulty problems will help you practice applying linked list concepts and data structure design:
- Add Two Numbers
- Reverse Linked List II
- Remove Nth Node From End of List
- Copy List with Random Pointer
- LRU Cache
- Merge k Sorted Lists
- Reverse Nodes in k-Group
- Design Linked List
Regular practice is essential for success on the GCA. The more problems you solve, the more comfortable you'll become with recognizing patterns and applying appropriate techniques.
Additional Resources
Linked Lists in Python
- Real Python - Linked Lists in Python
- GeeksforGeeks - Linked Lists
- Python Official Documentation - Data Structures