krahets / hello-algo

《Hello 算法》:动画图解、一键运行的数据结构与算法教程。支持 Python, Java, C++, C, C#, JS, Go, Swift, Rust, Ruby, Kotlin, TS, Dart 代码。简体版和繁体版同步更新,English version ongoing
https://www.hello-algo.com
Other
97.45k stars 12.34k forks source link

md docs is not synchronized with code #797

Closed wenjianmin closed 1 year ago

wenjianmin commented 1 year ago

Q:Found that the binary tree chapter documentation is out of sync with the code presentation

image image

Are you planning to replace the code fragment in md with [class]{xxx}-[func]{xxx}? I can contribute to the work!

krahets commented 1 year ago

Thanks! The TreeNode class shown in the document is a common and most-used version, while the TreeNode in source code contains a more property height for constructing AVL Tree.

I think it is not necessary to replace them with a link because the definition will be rarely modified.

krahets commented 1 year ago

However, it seems like the TreeNode in the document is not correct. Could you fix it?