26 Commits
Author SHA1 Message Date
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 bcd86fc1ed Cite demo-source regions for heap operations and the linked-list node classes (#2036)
Batch 3a of the runnable-snippets plan. heap_operations now cites the heap
demos in Python, C++, Java, C#, Go, Swift, Rust and Kotlin; the demos call
the library directly instead of push/pop helpers and print each popped value.
list_node_class cites each language's shared ListNode (Swift stays literal)
and doubly_list_node_class cites linkedlist_deque (Go stays literal).

Node comments adopt reviewed source wording, Rust and Swift get import
regions, the Ruby typo 前躯 becomes 前驱, and the TypeScript doubly node
fields become nullable. en, ja, ko and zh-hant are regenerated; ru is
synced by hand.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-16 05:23:41 +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 b0c147b67c Polish rust (#1777)
* Polish rust

* Update array queue and linkedlist queue

* Update linkedlist deque

* make array deque generic
2025-07-10 06:33:22 +08:00
rongyi 00738f5bb4 idomatic rust (#1652)
* idomatic rust

* Update linkedlist queue/deque
2025-02-10 10:40:29 +08:00
rongyi ef3010bd77 idomatic structure rust code, no include macro (#1528) 2024-10-23 18:49:47 +08:00
rongyi 556af1624c No need to match expand pop, just return it (#1154) 2024-03-27 01:29:43 +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
易春风 9baf4a1753 Use Vec.last() method to access the top item of stack. (#942)
* Use Vec.last() method to access the top item of stack.

* Use Vec.last() method to access the top item of stack.
2023-11-13 14:18:29 +08:00
krahets c310edb672 Polish the chapter of array and linkedlist 2023-08-17 05:13:19 +08:00
Yudong Jin 027bdd6510 Release Rust code to documents. (#656) 2023-07-26 11:00:53 +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 1c8b7ef559 refactor: Replace 结点 with 节点 (#452)
* Replace 结点 with 节点
Update the footnotes in the figures

* Update mindmap

* Reduce the size of the mindmap.png
2023-04-09 04:32:17 +08:00
sjinzhandYudong Jin c2be6ebfbe 🚀feat: add rust codes for array_deque (#418)
* update zig codes style

* feat: add rust codes for array_deque

* Update array_deque.rs

---------

Co-authored-by: Yudong Jin <[email protected]>
2023-03-14 20:45:27 +08:00
krahets 516cb17775 Replace poll with pop 2023-03-13 22:39:45 +08:00
Yudong Jin 8aebbaad21 refactor: Replace poll with pop in Queue and Deque (#415) 2023-03-13 21:58:21 +08:00
sjinzh 6924d15f63 🚀feat: add rust codes for linkedlist_stack, linkedlist_queue and linkedlist_deque (#410)
* feat: add rust codes for space_complexity

* feat: add rust codes for linkedlist_stack

* update

* feat: add rust codes for linkedlist_queue

* feat: add rust codes for linkedlist_deque

* update
2023-03-13 20:15:11 +08:00
xBLACKICEx 1209261bdd 🦄 refactor(rust/deque): change LinkedList to VecDeque (#364)
* 🦄 refactor(deque):  change LinkedList to VecDeque

* 📃 docs(deque): add author

* 🦄 refactor(rust/queue):  change LinkedList to VecDeque

* 📃 docs(rust/queue): add author

* 📃 docs(deque): corrent author format
2023-02-15 21:32:03 +08:00
WangSLandwsl ea5677b3c6 Add array_queue.rs in chapter_stack_and_queue (#359)
* array_stack.rs

* array_queue.rs

* Update Cargo.toml

* Create array_queue.rs

* Delete array_queue.rs

* Add array_queue.rs in chapter_stack_and queue

* Update array_queue.rs

---------

Co-authored-by: wsl <[email protected]>
2023-02-11 18:03:49 +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
WangSLandwsl cb73007495 array_stack.rs (#337)
Co-authored-by: wsl <[email protected]>
2023-02-06 01:12:53 +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