~/talk

Python Heaps-ters

TalkinSpanishat PyConES 2018 · 2018-10-05..10-07· [python]
links:none on file
slides:none on file

Introduces Python's heapq module and demonstrates practical uses of heaps beyond the basic priority-queue example, explaining how heaps let you access the min/max in O(1) and insert in O(log n) and why that matters (e.g., heapsort and finding the n smallest items in huge files). Shows how heaps work and when to choose them to solve problems efficiently, with short, practical code examples in Python.

AI-written summary · about

  1. 0:00Heaps introduction
  2. 1:11Finding maximum problem
  3. 6:33Failed attempts without heaps
  4. 9:48What is a heap
  5. 15:37Heap implementation
  6. 18:10Heaps in Python
  7. 20:14Max-heaps and tricks
  8. 21:39Solution with heaps
  9. 22:21nlargest and nsmallest functions
  10. 23:24Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.