Her : he must be out cheating meanwhile bro Rewriting all his algo using the new functions 🤣
2 weeks ago | 3
They won’t support this version during interviews, don’t form muscle memory
2 weeks ago | 1
Python did have max heap before 3.14 versions but they are not mentioned in the API. For example heapq._heapify_max(nums) will do the same thing in versions < 3.14 same with other methods as well.
2 weeks ago | 0
Python 3.14 also removed the global interpreter lock which means we can achieve parallelism with just one process
2 weeks ago | 2
NeetCodeIO
Python finally supports native max heap operations!
Python 3.14 added the following methods to the heapq module:
- heapify_max()
- heappush_max()
- heappop_max()
- heapreplace_max()
- heappushpop_max()
Before this, we had to negate values when pushing and popping from a heap, as a workaround to simulate a max heap (using a min heap).
Idk why this took so long, but it's a pleasant surprise. And frankly, it's another reason why Python is the obvious choice for readability in coding interviews.
We also added Python 3.14 support to neetcode.io/
If you're still not using Python, what is you doing.
---
Idk about you guys, but with the muscle memory I built up, this change might take some getting used to 😅
2 weeks ago | [YT] | 537