chore: initialize containerized Python learning workbook (2026 DevOps/SRE)

This commit is contained in:
soda64 committed 2026-11-30 22:55:56 +01:00
commit ae4c421815
63 files changed
+1273

No files matched your search

@@ -0,0 +1,37 @@
from collections import Counter, deque
class Stack[T]:
def __init__(self) -> None:
self._items: list[T] = []
def push(self, value: T) -> None:
raise NotImplementedError("Dodaj element na wierzch stosu")
def pop(self) -> T | None:
raise NotImplementedError("Zdejmij element lub zwróć None gdy pusty")
def peek(self) -> T | None:
raise NotImplementedError("Podgląd wierzchu stosu bez zdejmowania")
def is_empty(self) -> bool:
raise NotImplementedError("Zwróć True jeśli stos jest pusty")
class Queue[T]:
def __init__(self) -> None:
self._items: deque[T] = deque()
def enqueue(self, value: T) -> None:
raise NotImplementedError("Dodaj na koniec kolejki")
def dequeue(self) -> T | None:
raise NotImplementedError("Zdejmij z początku kolejki lub zwróć None")
def __len__(self) -> int:
return len(self._items)
def top_k_frequent(items: list[str], k: int) -> list[str]:
_ = Counter
raise NotImplementedError("Zwróć k najczęstszych elementów używając Counter.most_common(k)")