23 Commits
Author SHA1 Message Date
Yudong JinandClaude Opus 5.5 6d19673be3 Fix demo comments and labels that contradict the code (#2048)
Fix Chinese wording that contradicted the demo code: the C++ std::hash
scope, the Rust node-value hash label, the Go Pop comment and the Go
stack test comment. Russian sources and all six editions' snippets
follow; the Go heap snippets drop the repository-only PrintHeap call.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 21:50:05 +08:00
Yudong JinandClaude Opus 5.5 4fd605c502 Correct and unify doc snippets; fix errors in the demo sources (#2039)
Code snippets in the book are corrected and unified across languages and
kept as literal blocks in the snippet files. The demo sources keep their
#2033 form, with fixes only for real errors: wrong code, wrong printed
labels, comments that contradict the code, and typos. en/ja/ko demos are
rendered from the reviewed code dictionaries (krahets/hello-algo-workspace#78).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-23 15:29:13 +08:00
Yudong JinandClaude Opus 5.5 ded7ddc635 Revert the runnable-snippets batches to the #2033 state (#2038)
Reverts #2034, #2035, #2036 and #2037. The work will return in a single
reviewed PR that is completed before it merges. The tree equals 8c96e2f30
(#2033).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 06:45:32 +08:00
Yudong JinandClaude Opus 5.5 eeb8a3b790 Cite demo-source regions from the remaining A-class snippets (batch 2) (#2035)
Migrate init_array, hash_map_operations, hash_map_traversal,
queue_operations, deque_operations and insert_remove_node: zh and ru
demo sources gain region markers and the snippets' comments, en, ja and
ko are regenerated from reviewed translations, zh-hant via OpenCC. 70
blocks become region references; builtin_hash and five blocks without
reviewed translations stay literal.

The Java, Kotlin and Rust deque demos follow the book's order, and a few
demo comments and typos are aligned with the snippets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 04:23:45 +08:00
rongyi bd03b8c66e tiny fix, more readable rust 2025-03-10 17:22:06 +08:00
Frost Wongandfrost.wong e36453ac25 replace std::mem::replace with std::mem::take according to clippy sugguestion (#1611)
Co-authored-by: frost.wong <[email protected]>
2025-01-26 06:09:26 +08:00
rongyi ef3010bd77 idomatic structure rust code, no include macro (#1528) 2024-10-23 18:49:47 +08:00
rongyi f901a31bae fix(Rust): no need to clone in hash put fn (#1226)
* no need to clone in hash put fn

* fmt rust code

* make code more readable

* Change vec append to extend, more friendly to rookie rust dev

* drop comment
2024-04-07 14:46:21 +08:00
rongyiandYudong Jin 7b1094318b cargo fmt rust code (#1131)
* cargo fmt code

* Add empty line to seperate unrelated comments

* Fix review

* Update bubble_sort.rs

* Update merge_sort.rs

---------

Co-authored-by: Yudong Jin <[email protected]>
2024-03-16 02:13:41 +08:00
codingonionandYudong Jin 7ffef7e1d6 update the author info sjinzh -> codingonion (#1017)
* update author information

* Update index.md

---------

Co-authored-by: Yudong Jin <[email protected]>
2024-01-02 01:25:37 +08:00
Yudong Jin 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
Yudong Jin 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
易春风 4b5e21d0d9 refactor: update the hash_map_open_addressing rust codes to synchronize with java (#787) 2023-09-24 03:16:06 -05:00
Night Cruising 2217ffc447 feat: add rust codes for simple_hash (#724) 2023-09-08 00:38:55 +08:00
WangSL 13bb76c283 feat: add rust code for build_in_hash and hash_collision (#629)
* Create hash_map_chaining.rs

* Create hash_map_open_addressing.rs

* Create build_in_hash.rs

* Update Cargo.toml
2023-07-26 15:42:47 +08:00
krahets 60162f6fa8 Finetune Rust code. 2023-07-26 10:01:49 +08:00
Night CruisingandYudong Jin 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 <[email protected]>
2023-07-24 22:27:26 +08:00
Yudong Jin 9563965a20 Add the codes of hashmap (#553)
of chaining and open addressing
2023-06-14 02:01:06 +08:00
krahets 518b9efabc Update a comment in array_hash_map 2023-03-15 03:48:31 +08:00
krahets d5afd93571 Update array_hash_map 2023-03-15 03:11:43 +08:00
xBLACKICEx 533cb7bbbe ✨ feat(rust/hashing): add array_hash_map (#373)
* ✨ feat(rust/hashing): add array_hash_map

* 📃 docs(rust/hashing): correct comments
2023-02-23 23:02:13 +08:00
sjinzhandYudong Jin e65c7bd478 Refine some details and coding style for Rust codes (#344)
* Refine some details and coding style for Rust codes

* Update coding style for Rust codes

* Update time_complexity.rs

* Update array.rs

* Update leetcode_two_sum.rs

* Update hash_map.rs

* Update file headers

* Update coding style for Rust codes and Zig codes

* Update coding style for Rust codes and Zig codes

---------

Co-authored-by: Yudong Jin <[email protected]>
2023-02-09 00:25:01 +08:00
sjinzh 8a388d8422 update rust codes for hash_map, binary_search, bubble_sort, stack, queue (#330)
* update rust codes

* update rust codes

* update rust codes

* update and add rust codes for hash_map, binary_search, bubble_sort

* update and add rust codes for hash_map, binary_search, bubble_sort

* add rust codes for chapter stack

* add rust codes for chapter queue

* add rust codes for chapter deque
2023-02-05 16:25:42 +08:00