Commit graph

25 commits

Author SHA1 Message Date
krahets
dd72335235 Format C, C++, C#, Go, Java, Python, Rust code. 2023-09-02 23:54:38 +08:00
krahets
f5dda8d99a Polish the content 2023-08-21 03:06:53 +08:00
krahets
2626de8d0b Polish the chapter
introduction, computational complexity.
2023-08-20 14:51:39 +08:00
krahets
932d14644d Polish the content
Polish the chapter preface, introduction and complexity anlysis
2023-08-08 23:16:33 +08:00
gonglja
f7b827b303
Fix space_complexity.c build error. (#663)
* 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 space_complexity.c build error.

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-07-29 18:21:47 +08:00
gonglja
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
krahets
fb72aa385e Polish some texts. 2023-05-26 20:34:48 +08:00
krahets
f6d290d903 Update the comments of bubble sort
and insertion sort
2023-05-22 23:05:37 +08:00
krahets
145975b335 Rename the common modules in Java, C++ and C. 2023-04-24 04:11:18 +08:00
krahets
661603d467 Add the hashtable based on uthash.h to docs 2023-04-18 21:19:57 +08:00
Yudong Jin
dbc4906582
Publish the C codes to the docs. (#469) 2023-04-18 20:21:31 +08:00
krahets
9a98ff8a5e Format the C code in Clang-Format Style: Microsoft 2023-04-17 21:13:15 +08:00
Yudong Jin
881d573790
Refactor the articles related to searching algorithm. Add the chapter of binary search. Add the section of searching algorithm revisited. (#464) 2023-04-17 18:22:18 +08:00
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>
2023-04-15 23:51:35 +08:00
Yudong Jin
70dead5cd0 Update worst_best_time_complexity,
leetcode_two_sum
2023-02-03 18:53:15 +08:00
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.
2023-01-29 00:08:12 +08:00
Yudong Jin
40b5be5302 Unify the naming of the C codes. 2023-01-12 00:31:11 +08:00
Yudong Jin
6a46e38e1b
Merge pull request #228 from sjinzh/master
add zig codes for Section 'Space Complexity' and 'Space Time Tradeoff'
2023-01-11 14:32:59 +08:00
reanon
24cdcd54df feat(codes/c): add C include/ codes and modify exist C codes 2023-01-11 00:55:21 +08:00
sjinzh
a667e71b20 fix bug 2023-01-10 19:29:57 +08:00
Yudong Jin
73e3452838 Add Swift language blocks to the docs. 2023-01-08 19:41:05 +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
sjinzh
ea867eadac (PR #204) update c code and doc for time_complexity 2023-01-05 08:39:09 +08:00
sjinzh
9e4a5fd6d8 update c code for chapter_computational_complexity, add c code to time_complexity.md 2023-01-04 08:09:22 +08:00
sjinzh
1b356ba0a2 add c code for chapter_computational_complexity 2023-01-03 21:19:11 +08:00