Commit graph

17 commits

Author SHA1 Message Date
krahets
145975b335 Rename the common modules in Java, C++ and C. 2023-04-24 04:11:18 +08:00
krahets
9c9c8b7574 Format C++ codes in Clang-Format Style: Microsoft 2023-04-14 03:44:02 +08:00
Gonglja
b9e97d3823
Fix access error when printArray(arr, 0) (#432)
* fix(codes/cpp): Memory leak fix: the space was not freed when pop removed the element.

* fix(codes/cpp): Fix access error when printArray(arr, 0)

* Update PrintUtil.hpp

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-03-20 21:26:20 +08:00
Gonglja
0659c54e77
Fix memory leaks (#433)
* fix(codes/cpp): Memory leak fix: the space was not freed when pop removed the element.

* fix(codes/cpp): Fix access error when printArray(arr, 0)

* fix(codes/cpp): Fix memory leaks: replace pointers with local variables, no need to manage memory
2023-03-20 21:17:19 +08:00
LoneRanger
7f4243ab77
fix Pointer recycle (#346) 2023-02-07 01:17:10 +08:00
LoneRanger
0b16a9f6a9
Part Heap : Code Translation into C++ (my_heap.cpp) (#321)
* 增加my_heap.cpp并补充对应的文档

* 修改heap.md

* Update my_heap.cpp

* Update heap.md

* Update my_heap.cpp

* Update my_heap.cpp

* Update heap.md

* Update my_heap.cpp

* Update my_heap.cpp

* Update heap.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-02-04 16:33:46 +08:00
Yudong Jin
6ca5fa7d93 Update heap.cpp 2023-02-04 14:41:31 +08:00
LoneRanger
8e9eecd610
Part Heap : Code Translation into C++ (heap.cpp) (#285)
* 添加heap章节C++版本关于heap的相关操作

* 完善C++版本的heap相关操作

* 完善C++版本的heap相关操作

* fix printHeap function
2023-02-04 14:35:45 +08:00
dumingyu
98d1244e32 fix(codes/cpp): add climits headers
This fixes clang++ compile error when using INT_MAX in PrintUtil.
2023-01-06 11:00:12 +08:00
Yudong Jin
0e49f0053a Update the format of the file headers
of c, cpp, java, js, ts, swift.
2023-01-06 03:39:19 +08:00
machangxin
aeb4e6077d Add C++, Python, Go code for chapter_hashing 2022-12-14 17:18:32 +08:00
Yudong Jin
8669e06414 Update stack and queue. 2022-11-30 02:27:26 +08:00
Yudong Jin
d2db8b8d60 Add C++ code for the chapter binary tree. 2022-11-29 02:21:49 +08:00
Yudong Jin
a8afc963b6
Update PrintUtil.hpp
Reverse the stack before printing.
2022-11-28 20:51:12 +08:00
qualifier1024
26f9d6363e
Update PrintUtil.hpp
补充了stack打印方法,形式为"top->num1, num2]"
我不确定这么做是否规范
2022-11-28 09:32:05 +08:00
Yudong Jin
731e98fc25 Add C++ codes for the chapter
array and linked list.
2022-11-27 19:07:35 +08:00
krahets
9a861140d8 Rearrange the chapters.
Start to translate codes from Java to Python.
2022-11-25 02:04:38 +08:00