Skip to content

Commit

Permalink
Modified Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-xiaoqiang committed Aug 10, 2018
1 parent c535cc8 commit c7987dd
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions doc/王晓强-个人报告.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,34 +207,32 @@

#### 单元测试

- 红黑树
```C++
#include "RBT.h"
int main()
{
RBT<int> *rbt = new RBT<int>;
rbt->insert(3);
rbt->insert(4);
rbt->insert(1);
rbt->insert(2);
rbt->insert(5);
rbt->insert(10);
rbt->insert(9);
rbt->insert(7);
rbt->insert(8);
rbt->insert(6);

```C++
#include "RBT.h"
int main()
{
RBT<int> *rbt = new RBT<int>;
rbt->insert(3);
rbt->insert(4);
rbt->insert(1);
rbt->insert(2);
rbt->insert(5);
rbt->insert(10);
rbt->insert(9);
rbt->insert(7);
rbt->insert(8);
rbt->insert(6);
rbt->erase(4);
rbt->erase(1);
rbt->erase(2);
rbt->erase(3);

rbt->erase(4);
rbt->erase(1);
rbt->erase(2);
rbt->erase(3);

rbt->print();
delete rbt;
return 0;
rbt->print();
delete rbt;
return 0;
}
```
```
- 程序运行输出
Expand Down

0 comments on commit c7987dd

Please sign in to comment.