Commit graph

2043 commits

Author SHA1 Message Date
Deming Chu
427c7ac59d
translation: refine the translation of data_structure/summary (#1374)
* feat: translate data_structure/summary to English

* fix space issue

* replace the encoding naming (krahets comment)

* refine (K3v123 comment)
2024-06-13 15:20:29 +08:00
rongyi
017b95f003
Make rust more idomatic (#1386) 2024-06-13 15:19:21 +08:00
nil
0774920d7f
fix(Go): Update array_queue.go and array_deque.go (#1362)
* 🐞 fix: 队列为空时不应该操作指向

* 🧪 test: 添加pop测试用例

* 🔧 build: 修改testify依赖包

* 🐞 fix: 双向队列为空时,pop不操作指向

* 🔧 build:

Remove third-party packages

* Delete codes/go/go.sum

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-05-31 17:38:27 +08:00
Yudong Jin
3f4220de81
Bug fixes and improvements (#1380)
* preorder, inorder, postorder -> pre-order, in-order, post-order

* Bug fixes

* Bug fixes

* Update what_is_dsa.md

* Sync zh and zh-hant versions

* Sync zh and zh-hant versions.

* Update performance_evaluation.md and time_complexity.md

* Add @khoaxuantu to the landing page.

* Sync zh and zh-hant versions

* Add @ khoaxuantu to the landing page of zh-hant and en versions.
2024-05-31 16:39:06 +08:00
Yudong Jin
39a6890b7e
Add intial translation of the figures for the chapters of backtracking, divide and conquer, appendix (#1337)
* Add intial translation of the figures for the chapters of backtracking, divide and conquer, appendix

* Update
2024-05-31 16:01:23 +08:00
Yudong Jin
59839c2437
Add intial translation of the figures for the chapters of graph, searching, and sorting (#1338)
* Add intial translation of the figures for the chapters of graph, searching, and sorting

* Update
2024-05-31 16:00:43 +08:00
Yudong Jin
8b3e705c71
Add intial translation of the figures for the chapters of hashing, tree, and heap (#1339)
* Add intial translation of the figures for the chapters of hashing, tree, and graph

* Update
2024-05-31 15:59:59 +08:00
Yudong Jin
ae2ff7a68a
Add intial translation of the figures for the chapters of dynamic programming, greedy (#1336)
* Add intial translation of the figures for the chapters of dynamic programming, greedy

* Update
2024-05-31 15:58:43 +08:00
khoaxuantu
a704c0d7f2
feat: finalize ruby code transpilation (#1379) 2024-05-31 12:30:55 +08:00
khoaxuantu
a14be17b74
[feat] add ruby code - chapter dynamic programming (#1378) 2024-05-30 17:11:56 +08:00
rongyi
63bcdb798a
[Rust] make rust part more idomatic and fix panic of backtrack template (#1370)
* Drop unused variable

* Idiomatic rust

* Fix panic template
2024-05-24 16:21:17 +08:00
khoaxuantu
aa818945f0
feat: Add Ruby code - chapter "Backtracking" (#1373)
* [feat] add ruby code - chapter backtracking

* feat: add ruby code block - chapter backtracking
2024-05-24 15:41:40 +08:00
rongyi
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
Lanjing Gong
0e221540a3
fix(c): Fix malloc allocation of secondary pointers can lead to dump issues (#1367) 2024-05-18 18:17:33 +08:00
CarrotDLaw
9afbc9eda5
[Rust] Use arrays instead of vectors in Chapter 4.1 Array (#1357)
* [Rust] Use array in chapter 4.1

* docs: update comments

* docs: update comments

* docs: update comments

* fix: update slices

* docs: update comments
2024-05-15 18:31:48 +08:00
rongyi
840692acce
Idiomatic rust (#1364) 2024-05-15 18:16:55 +08:00
khoaxuantu
9e569cf520
feat: add ruby code - chapter "divide and conquer" (#1361) 2024-05-15 18:14:15 +08:00
rongyi
063a41fa7f
[Rust] No need to use mut iter (#1356)
* No need to use mut iter

* Update iter
2024-05-12 14:49:25 +08:00
rongyi
ebff1cce9f
Stick with swap (#1352) 2024-05-11 17:59:44 +08:00
rongyi
7a96f6a743
Fix panic when array's len is less than 2 (#1353) 2024-05-11 17:59:11 +08:00
khoaxuantu
1f606d6852
feat: add ruby codes - chapter greedy (#1350) 2024-05-08 18:38:35 +08:00
rongyi
56a165bf98
cargo fmt code (#1349) 2024-05-08 18:37:38 +08:00
Yudong Jin
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
Yudong Jin
8e60d12151
Add the initial EN translation for C++ code (#1346) 2024-05-06 13:31:46 +08:00
popozhu
9e4017b3fb
Update heap.md (#1344) 2024-05-06 05:32:23 +08:00
Yudong Jin
1c0f350ad6
translation: Add Python and Java code for EN version (#1345)
* Add the intial translation of code of all the languages

* test

* revert

* Remove

* Add Python and Java code for EN version
2024-05-06 05:21:51 +08:00
Yudong Jin
b5e198db7d
Add intial translation of the figures for the rest of the chapters (#1340) 2024-05-04 19:24:41 +08:00
Yudong Jin
0047934042
Update the EN figures for the chapter of preface, introduction, complexity analysis, data structure, array and linked list, stack and queue (#1335) 2024-05-04 18:58:20 +08:00
K3v123
cac10b07a1
Translation: Update binary_tree.md (#1287)
* Translation: Update binary_tree.md

simplified some parts while others added a few words to make it clearer

* translation: Update binary_tree.md

edited most of the stuff that QiLOL has suggestion, again thanks QiLOL for the review

* translation: Update binary_tree.md

changed to simpler words instead.
Did not update the 2nd part, as I'm waiting for Khrahets to make the final decision
2024-05-03 19:50:36 +08:00
cyyy
aebaa3ef02
translation: Update hash_collision.md (#1153)
* 1

* Move `docs-en` to `en/docs`

* Revert the moving operation

* 1

* Update hash_collision.md

---------

Co-authored-by: krahets <krahets@163.com>
2024-05-03 19:50:20 +08:00
khoaxuantu
cb32c525e7
feat: Add Ruby code - chapter "Sorting" (#1333)
* feat: add ruby code - chapter sorting

* Update radix_sort.rb

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-05-03 19:46:42 +08:00
Hongting Su
a6be0ffdc3
Update graph_traversal.md (#1334)
The implementation uses hash set to store all visited vertices instead of hash table. Change the description text from "hash table" to "hash set"
2024-05-03 19:41:50 +08:00
huangjikun
ee67d3e6a7
Maintain the same semantics as other languages in n_queens.go (#1329) 2024-05-03 19:40:59 +08:00
Yudong Jin
d2d49551e3
Bug fixes for the figures of zh-hant version. (#1327)
Reduce image file size by ~10%.
2024-05-01 17:59:23 +08:00
Yudong Jin
354b81cb6c
Add "reference" for EN version. Bug fixes. (#1326) 2024-05-01 06:49:33 +08:00
Yudong Jin
bb511e50e6
Add the initial translation of chapter "greedy" (#1320) 2024-05-01 05:57:39 +08:00
Yudong Jin
316b0e9215
Add the initial translation of chapter "appendix" (#1325) 2024-05-01 05:57:29 +08:00
Yudong Jin
baf30b1c92
Add the initial translation of chapter "dynamic programming" (#1319) 2024-05-01 05:57:15 +08:00
Yudong Jin
3eb929ca6d
Add the initial translation of chapter "backtracking" (#1323) 2024-05-01 05:57:01 +08:00
Yudong Jin
3bd416600e
translation: Add the initial translation of chapter "divide and conquer" (#1322)
* Add the initial translation of chapter "divide and conquer"

* Update index.md

* Update summary.md

* Update index.md

* Update summary.md
2024-05-01 05:56:54 +08:00
Yudong Jin
01a2e31203
Add the initial translation of chapter "sorting" (#1321) 2024-05-01 05:56:35 +08:00
Yudong Jin
96597b8aaa
Add the initial translation of chapter "searching" (#1324) 2024-05-01 05:56:27 +08:00
Martin Xu
59d07264fc
feat: add ruby code block - bucket sort (#1285)
* feat: add ruby code block - bucket sort

* Update codes/ruby/chapter_sorting/bucket_sort.rb

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* Update codes/ruby/chapter_sorting/bucket_sort.rb

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* Update bucket_sort.rb

---------

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>
Co-authored-by: Yudong Jin <krahets@163.com>
2024-04-30 16:00:39 +08:00
nuomi1
84bb11522e
feat: remove setup-swift (#1312)
* feat: remove setup-swift

* Test failure

* Test success

---------

Co-authored-by: Yudong Jin <krahets@163.com>
2024-04-30 15:59:56 +08:00
洪鈞閔 ( jasper )
68f3a453e1
feat: add ruby code block - merge sort (#1260)
* feat(codes/ruby/chapter_sorting/merge_sort.rb): add merge_sort ruby file

* feat(codes/ruby/chapter_sorting/merge_sort.rb): modify comment space

* feat(codes/ruby/chapter_sorting/merge_sort.rb): set array default value

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* feat(codes/ruby/chapter_sorting/merge_sort.rb): driver code add if logic

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* feat(codes/ruby/chapter_sorting/merge_sort.rb): modify comment style

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* feat(codes/ruby/chapter_sorting/merge_sort.rb): modify logic instruction

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

---------

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>
2024-04-30 15:58:47 +08:00
洪鈞閔 ( jasper )
3f857db457
feat: add ruby code block - heap sort (#1261)
* feat(codes/ruby/chapter_sorting/heap_sort.rb): add heap_sort ruby file

* feat(codes/ruby/chapter_sorting/heap_sort.rb): modify comment space

* feat(codes/ruby/chapter_sorting/heap_sort.rb): modify code space style

* feat(codes/ruby/chapter_sorting/heap_sort.rb): modify logic instruction

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* feat(codes/ruby/chapter_sorting/heap_sort.rb): driver code add if logic

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

---------

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>
2024-04-30 15:58:37 +08:00
Yudong Jin
870e3e5cb2
Bug fixes and improvements (#1318)
* Sync zh and zh-hant versions

* Update en/README.md

* Add a Q&A for chapter of introduction

* Update the callout headers

* Sync zh ang zh-hant versions

* Bug fixes
2024-04-30 15:52:05 +08:00
huangjikun
84b1ce2497
Fix incorrect method name in permutations_ii.go (#1313) 2024-04-30 14:13:01 +08:00
bluebean-cloud
a3950e1def
feat: Add ruby codes - chapter "Heap" (#1300)
* init heap Ruby

* feature: finish chapter heap for ruby

* fix delete heap.rb

* fix: Fix code style

* Update codes/ruby/chapter_heap/my_heap.rb

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* Update codes/ruby/chapter_heap/top_k.rb

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>

* fix: apply the suggested changes

* fix to_a

* Update my_heap.rb

---------

Co-authored-by: khoaxuantu <68913255+khoaxuantu@users.noreply.github.com>
Co-authored-by: Yudong Jin <krahets@163.com>
2024-04-28 22:24:51 +08:00
nuomi1
ca55e818a5
feat: update os and swift (#1311) 2024-04-28 22:22:03 +08:00