2114 Commits

Author SHA1 Message Date
63a0e73df0 Unify punctuation. 2023-07-26 08:59:36 +08:00
35973068a7 Prepare for release 1.0.0b4 2023-07-26 03:15:49 +08:00
b067016bfa Update preorder_traversal_iii. 2023-07-25 16:39:38 +08:00
90af225dae Remove -> None for Python functions 2023-07-24 22:34:05 +08:00
ac0f405f9a Fix quadraticRecur bug in space_complexity.c (#651)
* 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

* styles(codes/c): Modify function description

* styles(codes/c): Modify binary_search.c code style

* fix(codes/c): Fix the problem in binary_tree_bfs.c and the problem that the memory is not released.

* feat: Add preorder_traversal_i_compact.c

* feat(codes/c): Add head_sort.c

* feat(codes/c): Add bucket_sort.c

* feat(codes/c): Add binary_search_edge.c

* fix(codes/c): Add programs that are not managed by cmake (c code)

* feat(codes/c): Add selection_sort.c

* style(codes/c): Change swap in selection_sort.c to `selectionSort`

* styles(codes/c): Change style.

* fix(codes/c): Fix some formatting errors and temporarily remove backtracking chapters

* fix(codes/c): Fix quadraticRecur bug in `space_complexity.c`

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-24 22:29:13 +08:00
fdbe275fc9 fix: check the rust codes and fix them (#653)
* fix: check the rust codes and fix it

* Update binary_tree_bfs.rs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-24 22:27:26 +08:00
978d3c2ed7 fix(csharp): reformat csharp codes and docs (#652)
* fix(csharp): reformat the C# codes and docs

* Update time_complexity.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-24 19:50:00 +08:00
1777a16865 Fix Go comment and link 2023-07-24 13:11:00 +08:00
9ab4b0b15c Feature/array representation of tree swift (#649)
* refactor: encode & decode Tree

* style: build warning

* feat: add Swift codes for array_representation_of_tree article
2023-07-24 12:46:48 +08:00
c1adeb2399 feat(go/dp): support dynamic programming (#622)
* feat(go/dp): support climbing stairs

* feat(go/dp): support knapsack

* feat(go/dp): coin_change & edit_distance
2023-07-24 03:08:35 +08:00
10e5e7499b feat(go/greedy): add greedy in go code (#648) 2023-07-24 03:06:47 +08:00
41db3701ab Update max_product_cutting.java (#647) 2023-07-24 03:05:57 +08:00
17f995b432 Finetune the chapter of hashing,
divide and conquer, backtracking, tree
2023-07-24 03:04:55 +08:00
9d56622c75 feat: add rust codes for chapter greedy (#646)
* feat: add rust codes for chapter greedy

* Update max_product_cutting.rs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-22 20:35:57 +08:00
abec926c24 Finetune the documents.
Update mindmap.
Add the cover image of chapter appendix.
2023-07-22 04:29:08 +08:00
b43de88f71 feat(csharp): add csharp code for charper greedy (#645) 2023-07-22 02:54:41 +08:00
c9daeeff2d Add the section of summary of greedy. 2023-07-21 22:54:26 +08:00
e114ea2b65 Finetune the docments 2023-07-21 22:21:33 +08:00
eb695937a4 Add divide and conquer go code (#638)
* feat: Add Go code to binary search recursion under divide and conquer

* style: Code comment standardization

* style: modify function comment

* fix: fixed error when the list is empty

* Update print_utils.go

* Delete print_utils_test.go

* feat: add Go code to divide and conquer

* Update build_tree.go

* style: modify function name

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-21 22:16:42 +08:00
b676349dac Update hash_map.md (#641) 2023-07-21 22:15:46 +08:00
bba62bbe75 Fix the code of preorder_traversal_iii_compact 2023-07-21 22:08:26 +08:00
075c3abf88 Add the section of max product cutting problem. (#642) 2023-07-21 21:56:14 +08:00
ca5bde2b6c Add subtitles to docs 2023-07-21 21:54:51 +08:00
1a55dbdf2e Finetune doc and code. 2023-07-21 15:18:01 +08:00
76f11ae168 Add the section of max capacity problem. (#639) 2023-07-21 15:16:51 +08:00
8068c42688 fixed error when the list is empty (#637)
* feat: Add Go code to binary search recursion under divide and conquer

* style: Code comment standardization

* style: modify function comment

* fix: fixed error when the list is empty

* Update print_utils.go

* Delete print_utils_test.go

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-21 14:47:37 +08:00
da2c71d936 add c code for graph operation (#601)
* Create chapter_graph

* Delete chapter_graph

* add C code for graph

* add C code for graph

* Create graph_adjacency_list.c

add C code for graph

* Update CMakeLists.txt

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update format and output

* Update graph_adjacency_list.c

* Update CMakeLists.txt for c code of graph

* Update format of c code

* Update format of c code

* Update format of c code

* Update verticesList

Change the data structure of the storage list from a linked list to a linear table

* Update graph_adjacency_list.c

* Update graph_adjacency_matrix.c

* Create graph_adjacency_list_test.c

* Create graph_bfs

* Update CMakeLists.txt

* Update graph_adjacency_list.c

* mv graph_bfs to graph_bfs.c

* Update graph_bfs.c

* Delete graph_bfs

* Update graph_adjacency_list.c

* update c code for graph operation.

* Update CMakeLists.txt

* Update graph_dfs.c

* Update graph_dfs.c

* Update CMakeLists.txt

* Update graph_dfs.c

* Update note of graph_dfs.c

* Update graph_bfs.c

* Update graph_dfs.c

* Update graph_bfs.c

* Update output "初始化后,图为:" of graph_dfs.c

* Update graph_dfs.c

* Update graph_bfs.c

* Update graph_dfs.c

* Update name of arrayVertex

* Update name of arrayVertex

* Update note of graph_dfs.c

* Update note of graph_bfs.c

* Update graph_dfs.c

* Update graph_bfs.c

* Update graph_adjacency_matrix.c

* Update graph_adjacency_list_test.c

* Update graph_adjacency_list.c

* Update graph_dfs.c

* Update graph_bfs.c

* Update comment

* Update comment

* Update graph_adjacency_list.c

* Update graph_adjacency_matrix.c

* update comment

* update comment

* update comment for graph operation

* update comment of graph operation

* update comment

* update comment

---------

Co-authored-by: Yudong Jin <krahets@163.com>
Co-authored-by: libr <libr@info2soft.com>
2023-07-20 19:08:23 +08:00
4e4a13e1bb feat: Add Go code to binary search recursion under divide and conquer (#630)
* feat: Add Go code to binary search recursion under divide and conquer

* style: Code comment standardization

* style: modify function comment
2023-07-20 18:57:28 +08:00
30d1d36dd7 Update space_complexity.md (#631)
* Update space_complexity.md

修改一个C语言的函数,c语言中错误使用C++的STL库的vector类,现在更正为直接使用定义数组去申请内存

* Update space_complexity.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-20 18:56:35 +08:00
2af77ff565 feat(csharp): add csharp code for array binary tree (#632) 2023-07-20 18:54:40 +08:00
2b7d7aa827 Add the chapter of greedy. (#633)
Add the section of fractional knapsack.
2023-07-20 18:26:54 +08:00
c54536d1a1 Modify the problem of preorder_traversal_iii 2023-07-19 16:37:12 +08:00
4e13755023 Add implementation of array binary tree.
Rewrite the tree serialization and deserialization methods.
Add applications of array and linked list.
2023-07-19 16:09:27 +08:00
c68f18e480 Finetune 2023-07-19 01:45:14 +08:00
03cbf5b972 Anonymous inner classes create generic instances that display the dec… (#627)
* Anonymous inner classes create generic instances that display the declared type

* Update TreeNode.java

* Update binary_tree_bfs.java

* Update graph_bfs.java

---------

Co-authored-by: zongjianwei <zongjianwei@meituan.com>
Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-19 01:37:55 +08:00
7a6fd4b3dd feat(csharp): add csharp code for charper divide and conquer (#628) 2023-07-19 01:19:49 +08:00
8737fc66dd rust : add codes for chapter_divide_and_conquer (#621) 2023-07-19 00:32:05 +08:00
9ea8a73059 Feature/chapter dynamic programming swift (#608)
* feat: add Swift codes for intro_to_dynamic_programming article

* feat: add Swift codes for dp_problem_features article

* feat: add Swift codes for dp_solution_pipeline article

* feat: add Swift codes for knapsack_problem article

* feat: add Swift codes for unbounded_knapsack_problem article

* feat: add Swift codes for edit_distance_problem article
2023-07-18 12:49:03 +08:00
34985bdf2b Add the summary of chapter divide and conquer
Enable instant loading feature
Fix the math rendering in mathjax.js
2023-07-17 20:23:46 +08:00
06b309d021 1. Add section links to the chapter page.
2. Add chapter icons to navigation panel.
3. Replace recently added text with icon.
2023-07-17 17:54:48 +08:00
2caf3464ad Add the chapter cover image for divide and conquer 2023-07-17 04:53:54 +08:00
1f784dadb0 Add Java and C++ code for the chapter of
divide and conquer.
2023-07-17 04:20:12 +08:00
fc7bcb615d Add the section of binary_search_recur. 2023-07-17 03:48:33 +08:00
909daea105 Add the section of hanota problem. (#614) 2023-07-17 02:20:49 +08:00
f839dc1b0e Fix naming of the section
build_binary_tree_problem
2023-07-17 02:18:53 +08:00
a296786b2a feat: add rust codes for chapter heap (#612)
Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-16 15:40:25 +08:00
ead33ca863 zig : update codes style && rust : add codes for chapter_backtracking. (#613)
* zig : update codes style

* rust : add codes for chapter_backtracking

* zig : update codes style
2023-07-16 15:36:28 +08:00
51a4c5089e feat: Add the chapter of divide and conquer (#609)
* Add the chapter of divide and conquer.
Add the section of divide and conquer algorithm.
Add the section of build tree problem.

* Update build_tree.py
2023-07-16 04:24:04 +08:00
f5ea4fa1c6 feat: add rust codes for avl tree (#605)
* feat: add rust codes for avl tree

* fix a wrong usage of borrow method of RefCell

* Update avl_tree.rs

* fix comment indentation and field define of TreeNode

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-16 01:32:43 +08:00
b1f8857212 rust and zig : add codes for chapter_dynamic_programming (#606)
* rust : add codes for chapter_dynamic_programming

* zig : add codes for chapter_dynamic_programming

* rust : add codes for chapter_backtracking

* Update n_queens.rs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-15 23:16:02 +08:00