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.
ヒープソートを実行するプログラムがあり、要素の削除機能があります。これを行うには、右側の最後の要素を最後まで取得してから、n番目の要素をそれに置き換えます。並べ替えを維持するために、要素をヒープ内の正しい場所にバブルダウンします。私の友人はこれがうまくいくとは思わないようです。しますか?