Files
homelab-dsa-tutoring/shared/notes-and-examples/2026.02.11/main.py
Brendan Chen 862f236886
All checks were successful
Deploy to Homelab / deploy (push) Successful in 6s
Add notes for 2026.02.11
2026-02-11 16:00:00 -08:00

25 lines
522 B
Python

class Node:
prev_node = None
def __init__(self, value) -> None:
self.value = value
class Stack:
top: None | Node = None
def add(self, value):
# Implement as an exercise
pass
def remove(self) -> None | Node:
# Implement as an exercise
pass
def peek(self) -> None | Node:
# Implement as an exercise
pass
# Homework:
# - Implement the other methods on the stack
# - Implement linked list methods (see homework from 2026.01.28)