Skip to content

Commit

Permalink
命令错误
Browse files Browse the repository at this point in the history
进行堆排序得是heap,而不是nums,所以输出的应该是heap
  • Loading branch information
Huang-Jinxian authored Oct 10, 2017
1 parent 616973e commit 36942f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/c01/p04_find_largest_or_smallest_n_items.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ heapq 模块有两个函数:``nlargest()`` 和 ``nsmallest()`` 可以完美解
>>> import heapq
>>> heap = list(nums)
>>> heapq.heapify(heap)
>>> nums
>>> heap
[-4, 2, 1, 23, 7, 2, 18, 23, 42, 37, 8]
>>>
Expand Down

0 comments on commit 36942f1

Please sign in to comment.