alrightchiu / secondround Goto Github PK
View Code? Open in Web Editor NEW初學者寫給初學者的演算法教學
Home Page: http://alrightchiu.github.io/SecondRound/
初學者寫給初學者的演算法教學
Home Page: http://alrightchiu.github.io/SecondRound/
Left Roration(向左旋轉) => Left Rotation(向左旋轉)
Right Roration(向左旋轉) => Right Rotation(向右旋轉)
建議把所有 gh-pages 下的 http://
都改為 //
即可解決此問題
您好,我正在學習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
解決辦法是將這段代碼
if (y->parent == NULL){ // 若刪除的是原先的root, 就把x當成新的root this->root = x; }
改為
if (y->parent == NULL){ // 若刪除的是原先的root, 就把x當成新的root if(x) this->root = x; else this->root=0; }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.