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.
頭と尾の前後にノードを追加する方法は知っていますが、空の双方向リンク リストにノードを追加する方法はわかりません。どうすればこれを行うことができますか?ありがとうございました。
空のリストに挿入する場合は、両方headを作成tailして新しいノードを参照します。また、ノードnextとprevious参照が、コードの残りの部分が期待するものと一致していることを確認してください。
head
tail
next
previous