Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为了使用 _siftup/_siftdown 有效地修改元素的优先级,必须知道元素在列表中的位置(索引)。既然 heappush 不返回这个信息,那怎么实现呢?