krahets
661603d467
Add the hashtable based on uthash.h to docs
2 years ago
Yudong Jin
dbc4906582
Publish the C codes to the docs. ( #469 )
2 years ago
krahets
6723cdbc7e
Represent null with INT_MAX in C, C++.
2 years ago
krahets
af0f92c18d
Fine tune the C codes.
2 years ago
krahets
9a98ff8a5e
Format the C code in Clang-Format Style: Microsoft
2 years ago
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
gonglja
28fdd26f2f
Fix some errors of cmake build and add hashing_search.c ( #458 )
...
* 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
* fix(codes/c): Fix some errors of cmake build
* feat(codes/c): Add hashing_search.c
---------
Co-authored-by: Yudong Jin <krahets@163.com>
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
b3640c53d1
Remove unused functions.
2 years ago
krahets
f7ae9c8a02
Fix the return type of binary search tree and avl tree
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
Reanon
cac38c0c93
feat(bucket_sort): add bucket_sort code in go/c ( #443 )
...
* feat(bucket_sort): add bucket_sort code in go/c
* feat(go): add bucket_sort
* feat(c): add bucket_sort in c
* Update bucket_sort_test.go
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Yudong Jin
34a1bca627
Add the section of radix sort. ( #441 )
2 years ago
Guanngxu
9b0bdd929f
feat: add C merge sort ( #434 )
...
* feat: add C merge sort
* Update merge_sort.c
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Yudong Jin
65e47b0748
Add Python and C++ code for the counting sort. ( #436 )
2 years ago
Guanngxu
e539c44f63
feat: add C counting_sort ( #430 )
...
* feat: add C counting_sort
* Update CMakeLists.txt
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Reanon
c837882dbd
feat(counting_sort): support counting_sort in c/go ( #431 )
...
* feat(go/counting_sort): support counting_sort in go
* feat(test): support counting_sort_naive testcase
* feat(go/counting_sort): support counting sort
* feat(c/counting_sort): support counting_sort in c
2 years ago
Guanngxu
2356cc1b2e
add C binary_search and linear_search ( #426 )
...
* add C binary_search
* add C linear_search
* Update linear_search.c
* Update binary_search.c
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Gonglja
564ace6bc1
feat(codes/c): Add linkedlist_deque.c ( #422 )
...
* feat(codes/c): Add linkedlist_deque.c
* feat(codes/c): Update linkedlist_deque.c function comment.
* feat(codes/c): Update linkedlist_deque.c driver code.
2 years ago
krahets
3cd724a6d8
Update list_node.h
2 years ago
krahets
0840bc2043
Fix the deconstructor of linkedlist_queue.cpp
2 years ago
krahets
516cb17775
Replace poll with pop
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
Gonglja
2d17ee8e92
feat(codes/c): Add array_deque.c ( #412 )
...
* feat(codes/c): Add array_deque.c
* Update array_deque.c
---------
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Gonglja
f73b6a3654
feat(codes/c): Add linkedlist_queue.c ( #413 )
...
* feat(codes/c): Add linkedlist_queue.c
* feat(codes/c): Prevent null pointer access errors in linkedlist_queue.c
* Update linkedlist_queue.c
* Update linkedlist_queue.c
---------
Co-authored-by: Yudong Jin <krahets@163.com>
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
Leo.Cai
d249c8802e
add chapter_sorting by dart ( #366 )
...
* add chapter_sorting by dart
* fixed style of dart and bug mentioned before
* alter min value of dart
* Update radix_sort.dart
---------
Co-authored-by: Yudong Jin <krahets@163.com>
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
300016393b
Add code source blocks to the chapter Graph.
...
Fix "函数" and "方法"
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
Reanon
93ca29ca6d
feat(graph): add go codes ( #314 )
...
* feat(graph): add go codes
* feat(go/graph): add graph_adjacency_list
* doc(graph): add go codes
* fix(graph): fix go codes
* Update graph_adjacency_matrix_test.go
---------
Co-authored-by: Yudong Jin <krahets@163.com>
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
286b441bed
Update .gitattributes
2 years ago
Yudong Jin
7f3752d306
Update README.md
2 years ago
Yudong Jin
9973822672
Merge branch 'develop'
2 years ago
Yudong Jin
ddd5562b60
Fix the index out of bound check in my_list.
2 years ago
Zero
9c2caad067
Add queue array impl in C ( #300 )
...
* feat(codes/c): Add array_queue.c initialization
* feat(codes/c): Add array_queue.c impl
* style(codes/c): Update array_queue.c code style
* style(codes/c): Update array_queue.c code style
2 years ago
Reanon
da405b579d
Modify the code style of C ( #299 )
...
* style(my_list): modify c codes.
* style(stack): modify c codes.
* style(hash): modify c codes.
2 years ago
Zero
3a2a9a996c
fix(codes/c): Fix file header error message ( #298 )
2 years ago
Zero
3d197feb30
feat(codes/c): Update array_stack.c codes ( #289 )
2 years ago
Zero
0b5761eaf5
fix(codes/c): Fix unknown behavior when size is 0 or arr is a null pointer ( #288 )
...
Co-authored-by: Yudong Jin <krahets@163.com>
2 years ago
Yudong Jin
1c7008289f
Merge pull request #273 from Reanon/feat-c-sort
...
Add quick_sort/radix_sort to C code.
2 years ago
Yudong Jin
a0990a0f7a
Merge branch 'master' into master
2 years ago
reanon
d4d11d9f7d
fix(sort): add c codes
2 years ago