Python heapq.heapify空间兼容性

时间:2018-09-19 20:29:18

标签: python-3.x heap

Python中heapq.heapify的SPACE复杂度是多少?

医生说

  
      
  • heapq.heapify(x)
      在线性时间内将列表x转换为堆。
  •   

还是in-place表示空间复杂度是O(1)?

0 个答案:

没有答案