Commit graph

1598 commits

Author SHA1 Message Date
krahets
eb8df49993 Update bubble sort and insertion sort. 2023-05-23 21:20:14 +08:00
xBLACKICEx
abecea9ab6
feat(rust/tree): add binary_search_tree (#481)
*  feat(rust/tree): add binary_tree_dfs

*  feat(rust/tree): add binary_tree_bfs

* 🐞 fix(rust/tree): can't list to any kind of tree

* feat(rust/tree): add binary_search_tree

* Update binary_search_tree.rs

* 🐞 fix(rust/tree): corret writing mistakes

* 🦄 refactor(rust/tree): remove get_next_node() function

* Update binary_search_tree.rs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-23 15:42:08 +08:00
krahets
89a9741e9e Fix some comments. 2023-05-22 23:13:54 +08:00
krahets
f6d290d903 Update the comments of bubble sort
and insertion sort
2023-05-22 23:05:37 +08:00
krahets
5b406666d8 Polish the content 2023-05-22 22:04:31 +08:00
krahets
e196962d0a Simplify the declarations of the Python code. 2023-05-22 22:03:57 +08:00
krahets
081b76d620 Polish the sections of binary search. 2023-05-22 01:37:12 +08:00
krahets
24d90931e3 Update the callouts for the algorithm problems. 2023-05-21 19:58:21 +08:00
krahets
d95c628eef Fix the test case of binary search. 2023-05-21 19:29:24 +08:00
krahets
d3cc149c5a Merge the chapter of binary tree and searching. 2023-05-21 19:26:52 +08:00
Yudong Jin
b5eb9ca271
feat: Add the section of binary search edge. (#508)
* Add the section of binary search edge.

* Delete binary_search_rotation.py
2023-05-21 19:04:21 +08:00
krahets
c3e7455285 Refactor the section of bianry search. 2023-05-21 04:51:32 +08:00
Jefferson Huang
921d87c238
feat: add chapter_binary_search by dart (#506)
* feat: add chapter_sorting by dart

* feat: add chapter_searching by dart

* feat: add chapter_binary_search by dart

---------

Co-authored-by: huangjianqing <huangjianqing@52tt.com>
2023-05-21 02:31:15 +08:00
krahets
399e5df39a Polish some cotents. 2023-05-18 20:27:58 +08:00
Jefferson Huang
335bc29af2
feat: add chapter_sorting and chapter_searching by dart (#497)
* feat: add chapter_sorting by dart

* feat: add chapter_searching by dart

---------

Co-authored-by: huangjianqing <huangjianqing@52tt.com>
2023-05-18 19:05:48 +08:00
liuyuxin
ec4202031e
feat: add dart code for chapter_graph (#498) 2023-05-18 19:04:39 +08:00
Suremotoo
951599e192
Update hash_collision.md (#504)
* Update hash_collision.md

a detailed description of the conditions for converting a linked list into a red-black tree is as follows.
 
```java
  final void treeifyBin(Node<K,V>[] tab, int hash) {
        int n, index; Node<K,V> e;
        if (tab == null || (n = tab.length) < MIN_TREEIFY_CAPACITY)
}
```

* Update hash_collision.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-18 19:02:32 +08:00
krahets
00f8253353 Update the style of Q&A 2023-05-17 20:36:45 +08:00
krahets
e66fc03399 Add Q&A to the chapter of data structure.
Update the section of character encoding.
2023-05-17 20:33:45 +08:00
krahets
817b4598d5 Fix a comment in binary_search_tree code 2023-05-17 19:04:46 +08:00
krahets
26cc480ff5 Fix some errors. 2023-05-17 05:13:41 +08:00
krahets
b093162208 Fix my_list.py 2023-05-17 04:46:55 +08:00
krahets
7cfe6d7efe Add the section of number encoding
and character encoding
2023-05-17 04:38:32 +08:00
krahets
a60c7f148d Update the summary of the chapter preface. 2023-05-16 21:52:49 +08:00
krahets
f35020b335 Fix bucket_sort. 2023-05-15 19:54:07 +08:00
ZeYanLin
bae8298c8a
fix:range issue (#496) 2023-05-15 14:57:08 +08:00
Reanon
a6b3f72826
feat(go/backtracking): add go code (#488)
* feat(go/backtracking): add go code

* feat(backtracking): add n_queens in go

* feat(backtracking): add /preorder_traversal_i_compact in go

* feat(backtracking): add /preorder_traversal_ii_compact in go

* feat(backtracking): add /preorder_traversal_ii_template in go

* feat(backtracking): add preorder_traversal_iii_compact in go

* feat(backtracking): add preorder_traversal_test in go

* feat(backtracking): add permutations_i in go

* feat(backtracking): add permutations_ii in go

* feat(backtracking): add permutation_test in go

* feat(backtracking): fix bug in go

* Update permutations_i.go

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-15 01:17:42 +08:00
nuomi1
170713c642
feat: add Swift codes for n_queens_problem article (#495)
* refactor: rename PreorderTraversalIIITemplate

* feat: add Swift codes for n_queens_problem article
2023-05-15 01:13:17 +08:00
krahets
649d8c4c86 Fix the indentation of JS and TS code. 2023-05-14 01:40:19 +08:00
liuyuxin
541f384e7c
Fix function call error and null safety (#491) 2023-05-14 01:19:06 +08:00
Justin Tse
b52a98f178
Add JavaScript and TypeScript code of permutations and n_queens (Chapter of Backtracking) (#494)
* Add JavaScript and TypeScript code of permutations and n_queens (Chapter of Backtracking)

* Update n_queens.js

* Update permutations_i.js

* Update permutations_ii.js

* Update n_queens.ts

* Update permutations_i.ts

* Update permutations_ii.ts

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-14 01:18:40 +08:00
Justin Tse
01345c23ca
Add JavaScript and TypeScript code of preorder traversal (Chapter of Backtracking) (#490)
* Add JavaScript and TypeScript code of preorder traversal (Chapter of Backtracking)

* Update preorder_traversal_iii_compact.ts
2023-05-11 23:46:12 +08:00
krahets
7ca27c3df1 Prepare 1.0.0b3 release. 2023-05-10 21:00:04 +08:00
krahets
def8da6617 Prepare 1.0.0b3 release 2023-05-10 19:47:30 +08:00
krahets
ef73b7b1f1 Update index.md 2023-05-09 00:55:42 +08:00
krahets
fe69f7240d Add figures to replace_linear_by_hashing.md 2023-05-09 00:36:18 +08:00
gonglja
53ca2144e2
Fix the problem in binary_tree_bfs.c and the problem that the memory is not released. (#487)
* 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.

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-09 00:01:23 +08:00
krahets
a6c5f104f1 Remove util submodule. 2023-05-07 00:19:39 +08:00
hpstory
40319e7f30
refactor: use global using to reduce usings in each file (#486) 2023-05-06 22:48:02 +08:00
krahets
db6caf0d43 Update n queens. 2023-05-05 03:42:01 +08:00
hpstory
7b1de228a0
feat(csharp/backtracking): add csharp code in n queens (#485)
* feat(csharp/backtracking): add csharp code in n queens

* fix format

* Update n_queens.cs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-05-05 03:34:52 +08:00
nuomi1
9ec560d6cd
feat: add Swift codes for permutations_problem article (#482) 2023-05-04 05:31:06 +08:00
Yudong Jin
67d647ab59
feat: Add the section of n queens problem (#483)
* Add the section of n queens problem

* Update n_queens.py

* Update n_queens.java

* Update n_queens.cpp

* Update n_queens.java
2023-05-04 05:27:17 +08:00
krahets
78c84dfec6 Fix counting_sort.c 2023-05-03 22:58:48 +08:00
nuomi1
561ef20462
feat: add Swift codes for backtracking_algorithm article (#480)
* fix: compile error

* fix: package define

* feat: add Swift codes for backtracking_algorithm article
2023-05-03 18:45:43 +08:00
krahets
ca76336a55 Fix C code in quick_sort.md 2023-05-03 18:30:25 +08:00
krahets
bc77a81330 Update the codes of backtracking. 2023-04-27 02:17:04 +08:00
krahets
9c070a028f Update the code of permutations I and II 2023-04-27 01:29:00 +08:00
krahets
3f430fb85e Update the code of permutations i and ii 2023-04-27 01:18:18 +08:00
hpstory
918380b56a
feat(csharp/backtracking): add csharp code in permutations (#478)
* feat(csharp/backtracking): add csharp code in permutations

* Update permutations_i.cs

* Update permutations_ii.cs

* Update permutations_ii.cs

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-04-24 14:37:45 +08:00