-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add avl tree and heap part cpp code #320
Conversation
what-is-me
commented
Feb 4, 2023
- the code was tested.
- most of them were translated from Java version.
- heap.cpp wasn't translated well, but I have no better idea.
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
docs/chapter_heap/heap.md
Outdated
@@ -255,7 +297,23 @@ comments: true | |||
=== "C++" | |||
|
|||
```cpp title="my_heap.cpp" | |||
// 使用vector而非数组,这样无需考虑扩容问题 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用 vector 而非数组
Add a space between English char and Chinese char.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Please address the comments.
Could you help paste the console output to this PR? |
avl_tree.cpp
heap.cpp
myheap.cpp
I will modify my commit soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Hi! I found some mistakes in the |
Sorry, I just copied all the name of class and function from the Java code. |
Except for the naming, the code worked incorrectly. For example, this result is not correct.
|
The bug caused by the function swap? |
I'm so sorry I made something wrong in avl_tree.md. |