-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sync zh and zh-hant versions. * Remove the polyfill.io link from mkdocs.yml * Update contributors' info for code reviewers and en/zh-hant versions reviewers. * Fix graph.md * Update avatars for English version reviewers. * Sync zh and zh-hant versions. * Fix two_sum_brute_force.png * Sync zh and zh-hant versions. Optimize structrue of index.html. * Format index.html
- Loading branch information
Showing
65 changed files
with
414 additions
and
140 deletions.
There are no files selected for viewing
Binary file modified
BIN
+16 Bytes
(100%)
docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -353,4 +353,4 @@ <h3>贡献者</h3> | |
</a> | ||
</div> | ||
</div> | ||
</section> | ||
</section> |
Binary file modified
BIN
-1.77 KB
(88%)
en/docs/chapter_searching/replace_linear_by_hashing.assets/two_sum_brute_force.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,4 +420,4 @@ <h3>Contributors</h3> | |
</a> | ||
</div> | ||
</div> | ||
</section> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ | |
* Author: xBLACICEx ([email protected]), codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::print_util; | ||
use rand::Rng; | ||
|
||
/* 隨機訪問元素 */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,7 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use list_node::ListNode; | ||
use hello_algo_rust::include::{print_util, ListNode}; | ||
use std::cell::RefCell; | ||
use std::rc::Rc; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,7 @@ | |
* Created Time: 2023-01-18 | ||
* Author: xBLACICEx ([email protected]), codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
/* Driver Code */ | ||
fn main() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
/* 串列類別 */ | ||
#[allow(dead_code)] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,8 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::{print_util, vec_to_tree, TreeNode}; | ||
use std::{cell::RefCell, rc::Rc}; | ||
use tree_node::{vec_to_tree, TreeNode}; | ||
|
||
/* 前序走訪:例題一 */ | ||
fn pre_order(res: &mut Vec<Rc<RefCell<TreeNode>>>, root: Option<&Rc<RefCell<TreeNode>>>) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,8 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::{print_util, vec_to_tree, TreeNode}; | ||
use std::{cell::RefCell, rc::Rc}; | ||
use tree_node::{vec_to_tree, TreeNode}; | ||
|
||
/* 前序走訪:例題二 */ | ||
fn pre_order( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,8 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::{print_util, vec_to_tree, TreeNode}; | ||
use std::{cell::RefCell, rc::Rc}; | ||
use tree_node::{vec_to_tree, TreeNode}; | ||
|
||
/* 前序走訪:例題三 */ | ||
fn pre_order( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,8 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::{print_util, vec_to_tree, TreeNode}; | ||
use std::{cell::RefCell, rc::Rc}; | ||
use tree_node::{vec_to_tree, TreeNode}; | ||
|
||
/* 判斷當前狀態是否為解 */ | ||
fn is_solution(state: &mut Vec<Rc<RefCell<TreeNode>>>) -> bool { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,10 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use list_node::ListNode; | ||
use hello_algo_rust::include::{print_util, ListNode, TreeNode}; | ||
use std::cell::RefCell; | ||
use std::collections::HashMap; | ||
use std::rc::Rc; | ||
use tree_node::TreeNode; | ||
|
||
/* 函式 */ | ||
fn function() -> i32 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,7 @@ | |
* Author: xBLACICEx ([email protected]), codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
|
||
use hello_algo_rust::include::print_util; | ||
use rand::seq::SliceRandom; | ||
use rand::thread_rng; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,9 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
use hello_algo_rust::include::{print_util, TreeNode}; | ||
use std::collections::HashMap; | ||
use std::{cell::RefCell, rc::Rc}; | ||
include!("../include/include.rs"); | ||
use tree_node::TreeNode; | ||
|
||
/* 構建二元樹:分治 */ | ||
fn dfs( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: night-cruise ([email protected]) | ||
*/ | ||
|
||
include!("../include/vertex.rs"); | ||
pub use hello_algo_rust::include::{vals_to_vets, vets_to_vals, Vertex}; | ||
|
||
use std::collections::HashMap; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,9 +4,8 @@ | |
* Author: WSL0809 ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::ListNode; | ||
|
||
use crate::list_node::ListNode; | ||
use std::collections::hash_map::DefaultHasher; | ||
use std::hash::{Hash, Hasher}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: codingonion ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
use std::collections::HashMap; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: night-cruise ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
use std::collections::BinaryHeap; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: night-cruise ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
/* 大頂堆積 */ | ||
struct MaxHeap { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Author: night-cruise ([email protected]) | ||
*/ | ||
|
||
include!("../include/include.rs"); | ||
use hello_algo_rust::include::print_util; | ||
|
||
use std::cmp::Reverse; | ||
use std::collections::BinaryHeap; | ||
|
Oops, something went wrong.