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.
minHeap クラスを実装したので、コードを変更せずに minHeap クラスを最大ヒープとして使用できるかどうか興味がありますか?
値をヒープに入れる前と、ヒープから取り出すときに、すべての値の符号を反転するだけです。