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.
我有一个示例数据集:
import heapq listt=[5,6,7,5,15,1,5,3,4,5] heapq.heapify(listt) listt=list(enumerate(listt))
枚举listt后:
[(0, 1), (1, 3), (2, 5), (3, 4), (4, 5), (5, 7), (6, 5), (7, 5), (8, 6), (9, 15)]
我想在一个节点中可视化这个堆以便于理解。
示例图片: