227 Commits

Author SHA1 Message Date
f42cec0f88 fix(graph): enhance the judgment of boundary conditions for removeEdge functions (#1412) 2025-05-17 17:26:38 +08:00
09f7223067 optimized the js api use of counting_sort chapter for Math.max() (#1748)
* Update counting_sort.ts optimized the Math.max

* Update counting_sort.ts

* Update counting_sort.js

* Update radix_sort.ts

* Update radix_sort.js
2025-05-17 17:17:22 +08:00
98cd3a8076 fix: update the implementation of simple_hash.js and .ts (#1656) 2025-02-25 04:54:48 +08:00
c12d01a752 Update my_list.js (#1511)
修改insert注释
2024-09-24 17:57:34 +08:00
21be3fdaf8 [Rust] Normalize mid calculation in case overflow (#1363)
* Normalize mid calculate in case overflow

* Change ALL language

* Update merge_sort.py

* Update merge_sort.zig

* Update binary_search_tree.zig

* Update binary_search_recur.py

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-05-18 18:19:19 +08:00
c4a7966882 Bug fixes and improvements (#1348)
* Add "reference" for EN version. Bug fixes.

* Unify the figure reference as "the figure below" and "the figure above".
Bug fixes.

* Format the EN markdown files.

* Replace "" with <u></u> for EN version and bug fixes

* Fix biary_tree_dfs.png

* Fix biary_tree_dfs.png

* Fix zh-hant/biary_tree_dfs.png

* Fix heap_sort_step1.png

* Sync zh and zh-hant versions.

* Bug fixes

* Fix EN figures

* Bug fixes

* Fix the figure labels for EN version
2024-05-06 14:44:48 +08:00
cfc273783b feat: Add glossary and description for "哈希集合" (#1310) 2024-04-28 22:00:25 +08:00
1a99dd420f feat(JavaScript): Add the workflow file for CI check (#1296)
* feat(JavaScript): Add the workflow file for CI check

* Apply suggestions from code review
Co-authored-by: krahets <krahets@163.com>

* Test failure

* Update javascript.yml

* Test success

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-04-22 17:51:44 +08:00
034ee65e9a Fix bugs and harmonize the code comments (#1199)
* Fix the comment in array_deque.go

* Fix the comment in bucket_sort.c

* Translate the Java code comments to Chinese

* Bug fixes

* 二分查找 -> 二分搜尋

* Harmonize comments in `utils` between multiple programming languages
2024-03-31 03:06:41 +08:00
300a781fab Update code comment of quadratic in time_complexity (#1155) 2024-03-19 02:28:16 +08:00
9769e14017 Fix the median_three mehod for quick sort (#1134)
* Add the section of terminologies.

* fix format

* Fix median_three function for quick sort

* Delete docs/chapter_appendix/terminologies.md

* Update quick_sort.ts

* Update quick_sort.rs

* Update quick_sort.js
2024-03-15 01:06:59 +08:00
01c67781fa Bug fixes and improvements (#1133)
* Bug fixes

* Update the figure of the JD link

* Unify the code comments of insertion_sort
2024-03-14 20:01:16 +08:00
a005c6ebd3 Some improvements (#1073)
* Update avatar's link in the landing page

* Bug fixes

* Move assets folder from overrides to docs

* Reduce figures' corner radius

* Update copyright

* Update header image

* Krahets -> krahets

* Update the landing page
2024-02-07 22:21:18 +08:00
f6976978dd Prepare 1.0.0 release (#1044)
* Update the book with the thrid revised edition

* Fix a typo

* Update the contributors' information

* Update the mindmap

* Update the version number
2024-01-14 03:16:20 +08:00
d3cb600910 translation: Add the initial translation of the chapter of stack and queue (#1033)
* Update the format of Q&As in docs-en

* Fix the code comments of JavaScript and TypeScript

* Add the initial translation of the chapter of stack and queue
2024-01-08 19:06:37 +08:00
ddd375af20 feat: Add visualizing code blocks based on the pythontutor (#1029)
* Update copyright

* Update the Python code

* Fix the code comments in ArrayBinaryTree

* Fix the code comments in ArrayBinaryTree

* Roll back time_comlexity.py

* Add the visualizing code(pythontutor) blocks to the chapter complexity, data structure, array and linked list, stack and queue, hash table, and backtracking

* Fix the code comments
2024-01-07 04:04:01 +08:00
0f5b924036 Fix: recursion bug for JS and TS (#1028) 2024-01-06 16:29:39 +08:00
f68bbb0d59 Update the book based on the revised second edition (#1014)
* Revised the book

* Update the book with the second revised edition

* Revise base on the manuscript of the first edition
2023-12-28 18:06:09 +08:00
e720aa2d24 feat: Revised the book (#978)
* Sync recent changes to the revised Word.

* Revised the preface chapter

* Revised the introduction chapter

* Revised the computation complexity chapter

* Revised the chapter data structure

* Revised the chapter array and linked list

* Revised the chapter stack and queue

* Revised the chapter hashing

* Revised the chapter tree

* Revised the chapter heap

* Revised the chapter graph

* Revised the chapter searching

* Reivised the sorting chapter

* Revised the divide and conquer chapter

* Revised the chapter backtacking

* Revised the DP chapter

* Revised the greedy chapter

* Revised the appendix chapter

* Revised the preface chapter doubly

* Revised the figures
2023-12-02 06:21:34 +08:00
fcbaf101a4 Several bug fixes and improvements (#945)
* Update Dockerfile for code debugging.

* Format Python code using Black.

* Improve dark theme by defining html classes for the figures, animations and cover images.

* Fix several glossary translation.

* Update a code comment.

* Fix climbing_stairs_backtrack: the pruning should not require the sorted choices list.

* Update the code of array and list traversal.

* Fix a rendering issue of README.md

* Update code of list traversal.

* Fix array_definition.png

* Update README.md

* Fix max_capacity_moving_short_board.png

* Fix array.dart

* Fix array.dart

* Fix array.dart

* Fix array.dart
2023-11-14 21:27:35 +08:00
2b0cf6f9ab fix: the bug for the array binary tree from ts and js code (#936) 2023-11-13 14:06:17 +08:00
5f3ad1ed3d A few bug fixes. 2023-11-03 22:48:43 +08:00
355cc3a6b1 Bug fixes to C code. 2023-11-01 05:14:22 +08:00
e441ee4e35 Re-implement merge sort function. (#888) 2023-10-26 02:56:33 +08:00
7822bf9cd4 feat: add top_k.c and refactor top_k.js (#889)
* Add top_k.c based on my_heap.c

* Improve the implementation of top_k.js

* Add a comment to top_k
2023-10-26 02:54:19 +08:00
19023148ba feat: Update the implementation of hash_map_open_addressing.js and .ts (#881)
* add permutations_ii.c and re-implement permutations_i.c

* Update the implementation of hash_map_open_addressing.js and .ts

* Update hash_map_open_addressing.js

* Update hash_map_open_addressing.js
2023-10-24 23:46:34 +08:00
17252b53a9 Format code and docs. 2023-10-24 16:19:29 +08:00
88a1e4aaac refactor(JS, TS): Improve code readability in edit_distance (#860)
* fix(JS、TS): chapter_sorting QuickSortMedian and QuickSortTailCall example

* refactor(JS、TS): Improve code readability in edit_distance

* Updated code
2023-10-24 15:32:20 +08:00
5392afd44b fix several bugs 2023-10-17 23:45:31 +08:00
a8c624fa5a Fix the code in min_path_sum 2023-10-14 03:25:11 +08:00
da5ef293d9 fix a typo 2023-10-11 17:39:56 +08:00
fb552987f5 Update variable names in list and my_list 2023-10-09 18:20:42 +08:00
98538b924f Several bugs fixes and improvments; 2023-10-01 19:33:53 +08:00
ff8e7ceec5 Several bug fixes. 2023-09-24 20:38:21 +08:00
e3773b7f76 Several bug fixes and improments. 2023-09-24 19:35:32 +08:00
26bf0c5a78 feat: Add javascript and typescript code in chapter_computational_com… (#780)
* feat: Add javascript and typescript code in chapter_computational_complexity

* docs: Update code comment

* style: update code order th same with java
2023-09-24 03:17:19 -05:00
a6a1036dc9 fix(JS, TS): chapter_sorting QuickSortMedian and QuickSortTailCall example (#785) 2023-09-24 03:14:28 -05:00
2f727d895d Fix JS and TS sort bugs (#784) 2023-09-23 14:14:44 -05:00
8effa58a59 Several bug fixes. 2023-09-20 01:53:44 +08:00
9f59c572b5 fine tune 2023-09-17 01:13:15 +08:00
cb9c14f5ff fix build_tree, binary_search_tree.cs
fix two figures
2023-09-15 02:08:09 +08:00
d5bac12f60 fix: modify a function name in array_stack.js(ts) and array_queue.js(ts) (#739)
* Update array_stack.js

判空函数名称有歧义

* Update array_stack.js

* Update array_queue.js

* Update array_stack.ts

* Update array_queue.ts

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-13 03:00:39 +08:00
2b54352bec prepare 1.0.0b5 release 2023-09-10 23:11:50 +08:00
f71b2a40da fix preorder_traversal_iii_compact code 2023-09-09 00:51:00 +08:00
dd72335235 Format C, C++, C#, Go, Java, Python, Rust code. 2023-09-02 23:54:38 +08:00
978857570f Format JS and TS code. 2023-09-02 23:07:47 +08:00
f96f583771 Add Chapter greedy for JS and TS code (#718)
* Fix binary_search_tree TS code

* Update binary_search_tree js code style

* Add the JavaScript code for Chapter of Greedy

* Add the TypeScript code for Chapter of Greedy

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-02 20:20:17 +08:00
89a5f4d0d7 Fix binary_search_tree TS code and update JS code style (#715)
* Fix binary_search_tree TS code

* Update binary_search_tree js code style

* Update binary_search_tree.ts

* Update avl_tree.ts

* Update binary_search_tree.ts

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2023-09-02 19:56:23 +08:00
620bfb1f1d Iteration and recursion code in js/ts (#703)
* feat(JS and TS):add the section of iteration and recursion

* feat(JS and TS):add the section of iteration and recursion

* feat(JS and TS):add the section of iteration and recursion
2023-09-02 16:09:13 +08:00
a47a974a6a fix climbing_stairs_constraint_dp code 2023-08-31 02:31:58 +08:00