Yudong Jin
881d573790
Refactor the articles related to searching algorithm. Add the chapter of binary search. Add the section of searching algorithm revisited. ( #464 )
2 years ago
krahets
0ade8d87ad
Update the page tree
2 years ago
krahets
f5b8978330
Add cpp code for the backtrack algorithm.
2 years ago
Gonglja
8bc41bc013
Add space_complexit under C and fix memory leak under CPP ( #456 )
...
* 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
* fix(codes/cpp): Fix memory leaks: no delete
* fix(codes/cpp): Fix memory leaks: Add destructor ~ArrayHashMap()
* Update PrintUtil.hpp
* feat(codes/c): Add three-party hash implementation
* feat(codes/c): Add freeMemoryTree in tree_node.h
* feat(codes/c): Add space_complexity.c
* styles(codes/c): Modify format
* feat(codes/cpp): Undo a previous delete, there is no memory leak here
* Update array_hash_map.cpp
* Update include.h
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
krahets
f7ae9c8a02
Fix the return type of binary search tree and avl tree
2 years ago
krahets
9c9c8b7574
Format C++ codes in Clang-Format Style: Microsoft
2 years ago
krahets
0bec52d7cc
Polish the chapter of heap, introduction, preface.
...
Replace "其它" with "其他"
2 years ago
Yudong Jin
1c8b7ef559
refactor: Replace 结点 with 节点 ( #452 )
...
* Replace 结点 with 节点
Update the footnotes in the figures
* Update mindmap
* Reduce the size of the mindmap.png
2 years ago
Yudong Jin
830ec69d39
Add bucket_sort.cpp and bucket_sort.py ( #446 )
2 years ago
Yudong Jin
34a1bca627
Add the section of radix sort. ( #441 )
2 years ago
Yudong Jin
65e47b0748
Add Python and C++ code for the counting sort. ( #436 )
2 years ago
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>
2 years ago
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
2 years ago
Gonglja
3173d02538
fix(codes/cpp): Memory leak fix: the space was not freed when pop removed the element. ( #423 )
2 years ago
krahets
28f3c98697
Fix avl_tree.cpp
2 years ago
krahets
0840bc2043
Fix the deconstructor of linkedlist_queue.cpp
2 years ago
krahets
518b9efabc
Update a comment in array_hash_map
2 years ago
krahets
d5afd93571
Update array_hash_map
2 years ago
krahets
d37d704b18
Update CMakeLists.txt for C++
2 years ago
Gonglja
567497a6b8
Add cpp codes cmake build method ( #419 )
...
* feat(codes/cpp): Add cmake build method
* feat(codes/cpp): Modify the cpp support version to c++17
* feat(codes/cpp): fix graph_adjacency_list.cpp cannot be compiled into an executable
* style(codes/cpp): Adjust the code to enhance compatibility.
* feat(codes/cpp): Change cpp version from 17 to 11.
2 years ago
Yudong Jin
28aacccf44
refactor: Replace 'poll' with 'pop' in Heap ( #416 )
2 years ago
Yudong Jin
8aebbaad21
refactor: Replace poll with pop in Queue and Deque ( #415 )
2 years ago
krahets
82bbdd444d
Update the chapter of stack and queue.
2 years ago
Yudong Jin
33c797efeb
feat: Add C++ code for the graph bfs and dfs ( #401 )
...
* Add C++ code for the graph bfs and dfs
* Add C++ code for the graph bfs and dfs
2 years ago
Yudong Jin
4f941e3d99
Add C++ code for the linkedlist deque and array deque ( #400 )
2 years ago
krahets
9ea24e8b26
Change the operations sequence of the likedlist's insert() method.
2 years ago
krahets
0b72fef381
Fix quick_sort.py
2 years ago
方圆
f0d8d8b1b0
feat: add ArrayDeque ( #348 )
...
* 双向队列: java 代码
* 双向队列: markdown 内容
* Rewrite array_deque.java
Update array_queue.java, linkedlist_deque.java
* Add ArrayDeque figures and rewrite the contents
---------
Co-authored-by: krahets <krahets@163.com>
2 years ago
krahets
7238c560d1
Update binary_tree_bfs codes
2 years ago
krahets
8e0080f003
Update graph codes
2 years ago
Leo.Cai
d3ea84ba97
Add graph c++ code ( #357 )
...
* add c++ graph code
* fix the header
* delete the header wrongly auto added by editor
* fix for format
* fix code style
* fix code style
* fix graph_adjacency_list.cpp,alter 构造函数 to 构造方法
* update the markdown
* add deconstructor
* remove the deconstructor
* Update graph_adjacency_matrix.cpp
* Update graph_adjacency_list.cpp
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
LoneRanger
8d8b713865
fix poll() in my_heap.cpp ( #360 )
2 years ago
krahets
300016393b
Add code source blocks to the chapter Graph.
...
Fix "函数" and "方法"
2 years ago
krahets
6dc21691ed
Add build scripts for C# and
...
unify the coding style.
2 years ago
krahets
05f0054005
Add build script for JS and TS codes.
2 years ago
krahets
0407cc720c
Fix Repo
2 years ago
krahets
8f512c2840
Update code extractor of Java.
2 years ago
krahets
ecbf2d1560
1. Add build script for Java.
...
2. Add height limitation for code blocks in extra.css.
3. Fix "节点" to "结点".
2 years ago
LoneRanger
7f4243ab77
fix Pointer recycle ( #346 )
2 years ago
Yudong Jin
f14e3e4c57
Update linear_search and hashing_search.
2 years ago
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>
2 years ago
Yudong Jin
e1abbcbf23
Update #320
2 years ago
Leo.Cai
e5ae3e1cab
add avl tree and heap part cpp code ( #320 )
...
* 将avl_tree翻译成c++代码(文档明天补)
* markdown翻译了
* avl_tree.cpp翻译了
* 堆的cpp翻译
* modify the code format
* Update heap.md
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Yudong Jin
6ca5fa7d93
Update heap.cpp
2 years ago
LoneRanger
8e9eecd610
Part Heap : Code Translation into C++ (heap.cpp) ( #285 )
...
* 添加heap章节C++版本关于heap的相关操作
* 完善C++版本的heap相关操作
* 完善C++版本的heap相关操作
* fix printHeap function
2 years ago
Yudong Jin
70dead5cd0
Update worst_best_time_complexity,
...
leetcode_two_sum
2 years ago
Yudong Jin
7d14c9440e
Unify the function naming of
...
queue from `offer()` to `push()`
2 years ago
Yudong Jin
5eae708035
Fix array queue.
2 years ago
Yudong Jin
ddd5562b60
Fix the index out of bound check in my_list.
2 years ago
Yudong Jin
2336fe1d50
Update the comments in
...
binary_search_tree and avl_tree.
2 years ago
Yudong Jin
5f0ae848c4
Update medianThree() in quick_sort.
2 years ago
Yudong Jin
3e19205c84
Update a comment in binary_search_tree.
2 years ago
Yudong Jin
bb657f9517
Add destructors to the C++ codes.
2 years ago
ubuntu
08afeb2981
fix(codes/cpp): fix worst_best_time_complexity.cpp compile error.
2 years ago
Yudong Jin
daa28be3e4
Merge branch 'master' into binary_search_tree
2 years ago
龚国玮
96d54bff3a
test(binary_search_tree): update test param all the language
...
use param value 7, not 5. function test param value with param value in example picture as same.
2 years ago
Yudong Jin
d6d6a16c7e
Update the access() function of linked_list
2 years ago
Yudong Jin
4d01436138
Remove avl_tree.cpp to match the latest docs.
2 years ago
Yudong Jin
dcc3b2e35b
Optimize arrToTree function
...
in java, cpp, py, go, js, ts.
2 years ago
dumingyu
98d1244e32
fix(codes/cpp): add climits headers
...
This fixes clang++ compile error when using INT_MAX in PrintUtil.
2 years ago
Yudong Jin
0e49f0053a
Update the format of the file headers
...
of c, cpp, java, js, ts, swift.
2 years ago
Yudong Jin
3302354909
Update cpp codes for the stack and the queue.
2 years ago
Yudong Jin
410c5d6b62
Free memory after removing
...
a node from a LinkedList or TreeNode.
2 years ago
GN-Yu
a03353f8e2
Update merge_sort.cpp
2 years ago
Yudong Jin
eeb0aec2f1
Merge pull request #166 from L-Super/patch-1
...
Update bubble_sort.md
2 years ago
Yudong Jin
34ad07bfed
Fine tune
2 years ago
Yudong Jin
449258f0b0
Add the code to the docs.
2 years ago
Yudong Jin
f39636cb63
Update the structure of the chapter
...
of binary tree.
2 years ago
Yudong Jin
f3ef226874
Remove the spaces between “ ” and 中文 aside.
2 years ago
Yudong Jin
7283bbaf6f
Update the chapter of stack and queue.
2 years ago
Yudong Jin
1c4ba59606
Merge pull request #133 from tao363/master
...
Update array stack
2 years ago
Yudong Jin
fa3eff81d1
Update array stack.
2 years ago
Yudong Jin
a8fb1a4f41
Update source codes.
2 years ago
tao363
fe7564d54d
master
2 years ago
Yudong Jin
c071ab88d2
Update hash map
2 years ago
machangxin
1229f98e92
Fixed some problems, indentation and Pointer
2 years ago
machangxin
aeb4e6077d
Add C++, Python, Go code for chapter_hashing
2 years ago
Yudong Jin
bec787b751
Update time complexity and space complexity.
2 years ago
mgisr
bcc6aad18c
Merge branch 'krahets:master' into master
2 years ago
mgisr
24077ae392
fix(avl tree): fix all issue
2 years ago
Yudong Jin
ebf9024136
Add Go codes to docs, including
...
the chapter of stack and queue, the chapter of tree.
2 years ago
mgisr
641cf74afc
feat(codes/cpp/include/TreeNode.cpp): add 'parent' and 'height' field
2 years ago
mgisr
e9996b37d6
feat(codes/cpp/chapter_tree/avl_tree.cpp): create 'avl_tree.cpp'
2 years ago
Yudong Jin
e20bc251f5
Add python code of chapter queue to docs.
2 years ago
mgisr
84825a22d9
fix(codes/cpp/include/TreeNode.hpp): Fix 'vecToTree' function
2 years ago
Yudong Jin
acfdc713ba
update stack and queue.
2 years ago
Yudong Jin
8669e06414
Update stack and queue.
2 years ago
Yudong Jin
3fc3475af4
NULL to nullptr
2 years ago
Yudong Jin
d2db8b8d60
Add C++ code for the chapter binary tree.
2 years ago
Yudong Jin
980eaf65e0
Add a lib in include.hpp
2 years ago
Yudong Jin
56ef5a71cd
Update array_stack.cpp
...
Make `vec` a private member.
2 years ago
qualifier1024
f772e28acb
Update array_stack.cpp
...
仿照linkedlist_stack实现的array_stack,补上了测试代码
2 years ago
Yudong Jin
f351987887
Merge pull request #43 from qualifier1024/patch-12
...
Update queue.cpp
2 years ago
Yudong Jin
d2296a978e
Merge pull request #41 from qualifier1024/patch-10
...
Update linkedlist_stack.cpp
2 years ago
Yudong Jin
30a115082b
Update linkedlist_stack.cpp
...
Remove constructor
2 years ago
Yudong Jin
c18affcea3
Update linkedlist_stack.cpp
...
Add test code.
2 years ago
qualifier1024
894d0dd64d
Update queue.cpp
...
译自大佬的Java代码,更改了部分表述
2 years ago
Yudong Jin
9eb9168317
Merge pull request #39 from qualifier1024/patch-7
...
Update stack.cpp
2 years ago
Yudong Jin
a8afc963b6
Update PrintUtil.hpp
...
Reverse the stack before printing.
2 years ago
Yudong Jin
8b72cf5b35
Update stack.cpp
2 years ago
qualifier1024
06424ef023
Update linkedlist_stack.cpp
...
仿写的链表栈
2 years ago
qualifier1024
26f9d6363e
Update PrintUtil.hpp
...
补充了stack打印方法,形式为"top->num1, num2]"
我不确定这么做是否规范
2 years ago
qualifier1024
fe4af37290
Update stack.cpp
...
array.cpp修改了格式问题
2 years ago
Yudong Jin
731e98fc25
Add C++ codes for the chapter
...
array and linked list.
2 years ago
Yudong Jin
19a4ccd86a
Add cpp codes for the chapter
...
computational complexity, sorting, searching.
2 years ago
Yudong Jin
431a0f6caf
1. Add C++ codes for the chapter of
...
computational complexity, sorting, searching.
2. Corrected some mistakes.
3. Update README.
2 years ago
krahets
9a861140d8
Rearrange the chapters.
...
Start to translate codes from Java to Python.
2 years ago