Tag view

#collections

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with collections

7 cards

Python Medium Theory

collections and functools helpers: `defaultdict`, `Counter`, `deque`, `namedtuple`, `partial`, `reduce`, and `lru_cache`

These helpers reduce boilerplate for grouping, counting, queue behavior, lightweight record types, partial application, reduction, and memoization.

  • `Counter` counts fast
  • `deque` is strong for queues
  • `lru_cache` adds memoization with little code

collections and functools helpers: `defaultdict`, `Counter`, `deque`, `namedtuple`, `partial`, `reduce`, and `lru_cache`

Python Easy Theory

Set operations and frozenset in Python

Sets support fast membership checks and mathematical operations like union, intersection, difference, and symmetric difference.

  • Sets remove duplicates
  • frozenset is immutable and hashable
  • Set algebra is useful in filtering and comparison problems

Set operations and frozenset in Python