heapq in python

heapifyは少しtricky (sort()と同様、return値はNONE typeです。)
http://stackoverflow.com/questions/7465896/heapify-returns-nonetype
また、クラス内の変数で比較するときは
http://stackoverflow.com/questions/11989178/how-to-heapify-by-field-from-custom-objects
を参考にすると良いです。

タグ:

python
最終更新:2015年04月23日 06:51