You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
您好,我正在學習Data Structure。您的blog文章對我幫助很大,獲益良多。
當參考您的代碼實現Binary Search Tree的時候,發現這段代碼有一點小bug。
[Code](SecondRound/content/Algorithms and Data Structures/Tree series/ExampleCode/BST_Delete.cpp)
當BST中只剩下root的時候 x = y->rightchild;會導致x指向NIL
這時this->root = x;就會出錯,造成後續操作找不到root
Uh oh!
There was an error while loading. Please reload this page.
您好,我正在學習Data Structure。您的blog文章對我幫助很大,獲益良多。
當參考您的代碼實現Binary Search Tree的時候,發現這段代碼有一點小bug。
[Code](SecondRound/content/Algorithms and Data Structures/Tree series/ExampleCode/BST_Delete.cpp)
當BST中只剩下root的時候
x = y->rightchild;
會導致x
指向NIL
這時
this->root = x;
就會出錯,造成後續操作找不到root解決辦法是將這段代碼
改為
The text was updated successfully, but these errors were encountered: