Add homework for 2026.05.06

This commit is contained in:
2026-05-06 15:57:56 -07:00
parent cddf713c9a
commit f5e2fca2ac
2 changed files with 18 additions and 45 deletions

View File

@@ -0,0 +1,18 @@
#
class Student:
def __init__(self, name: str, year: int):
self.name = name
self.year = year
# homework: implement this Queue which orders students by year.
# students with a higher year are placed in front of students with a lower year
class Queue:
pass
def append(self, student: Student):
pass
def popleft(self) -> Student:
return Student(name="", year=0)