feat: binrary_search
This commit is contained in:
parent
61e416a0ba
commit
a085843c28
|
@ -0,0 +1 @@
|
|||
.idea/
|
|
@ -1,6 +1,9 @@
|
|||
// 解題影片 https://www.youtube.com/watch?v=98uu0FYPiU8&list=PL-qDGN2q6cbClYCRpJ2pyrlhYK9VjZmL3&index=2
|
||||
// leetcode https://leetcode.com/problems/remove-element/
|
||||
|
||||
fn main() {
|
||||
// 可變陣列要這樣用 rust
|
||||
let mut case_a: Vec<i32> = vec![3,2,2,3];
|
||||
let mut case_a: Vec<i32> = vec![3, 2, 2, 3];
|
||||
// 傳入時也要帖別聲明 &mut -> &mut case_a
|
||||
let result = remove_element(&mut case_a, 3);
|
||||
println!("Result: {}", result);
|
||||
|
|
Loading…
Reference in New Issue