- Notifications
You must be signed in to change notification settings - Fork0
add minimum_moves_to_equal_array_elements_ii#34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
0xmountaintop wants to merge95 commits intomasterChoose a base branch fromdev
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Draft
Changes fromall commits
Commits
Show all changes
95 commits Select commitHold shift + click to select a range
554d66f
init single-number-iii
0xmountaintop9c2ef2c
update
0xmountaintopf956209
init
0xmountaintop0e188cc
init sol for single_number_iii
0xmountaintopce474e2
foreach
0xmountaintop38bfbb9
add more
0xmountaintop28ca1b7
init sol2
0xmountaintopcfc6242
add
0xmountaintop14fed54
clean
0xmountaintop7178f9d
clean
0xmountaintop785b682
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop7389e34
init missing_number
0xmountaintop810d3bd
add
0xmountaintop076b0cc
add more
0xmountaintope289b51
add missing_number
0xmountaintopa60b390
add mroe
0xmountaintop972cd52
add sol4
0xmountaintop1baf60f
add sol3
0xmountaintopdb42760
udpate readme
0xmountaintope7ea802
init maximum_product_of_word_lengths
0xmountaintop6c30f64
update readme
0xmountaintop2286772
merge
0xmountaintop987dcda
minor
0xmountaintopb1a1712
update
0xmountaintopbe4bafb
fix readme
0xmountaintopeb63411
init max_product
0xmountaintop21fd9ba
update
0xmountaintop7235506
wip
0xmountaintop78390b4
from &str
0xmountaintopbcdaf0d
minor
0xmountaintopddad596
imnor
0xmountaintopf9def88
minor
0xmountaintope84f3b7
wip
0xmountaintop004780b
minor
0xmountaintop14cd70f
fix
0xmountaintop81ea210
???
0xmountaintop203a2bb
fix
0xmountaintopb475650
add
0xmountaintop451b9ed
update
0xmountaintop8322ca4
clean
0xmountaintop5898100
merge
0xmountaintopcf3c97a
fix
0xmountaintop2564bb9
merge
0xmountaintopa8080b3
merge
0xmountaintop96ed4a4
init for power_of_four
0xmountaintop4febd4d
update is_power_of_four
0xmountaintopf499b80
add sol1
0xmountaintop1b03a30
add sol2
0xmountaintop2b1c407
clean
0xmountaintop338a516
mark sol
0xmountaintop81589bd
init get_sum
0xmountaintopbadc27b
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop2364c69
fix readme
0xmountaintop9fe0f8e
add get_sum sol1
0xmountaintop61d04ac
wip
0xmountaintop4bc6684
refactor
ChrisLinnc3c31e3
refactor
ChrisLinncdcb3c7
add
ChrisLinnf16dfb1
add find_the_difference
0xmountaintop2a5ac09
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop2eb45aa
add
0xmountaintop0e87d6e
draft
0xmountaintopcef2b1e
init utf_8_validation
ChrisLinn946feab
add valid_utf8
ChrisLinnbd522ea
add utf_8_validation
0xmountaintop59437e2
cargo fmt
0xmountaintop49efa24
merge
0xmountaintop7a2a1b5
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop31d6d39
add sol3
0xmountaintop56ebeea
clean up
0xmountaintopa753940
fix
0xmountaintop7753c9d
fix
0xmountaintop61a62cf
init test_read_binary_watch
ChrisLinn0f17beb
add testcases
ChrisLinnab8a0d7
Merge remote-tracking branch 'origin/master' into dev
ChrisLinnbdb75f5
minor
0xmountaintop905afc7
minor
0xmountaintop357b3c6
clean up
0xmountaintop674c4e8
wip
0xmountaintop06e1ec9
fix
0xmountaintopddac1ec
fix
0xmountaintop6c98617
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop63c8b96
init maximum_xor_of_two_numbers_in_an_array
0xmountaintopfecae2e
add
ChrisLinn39587a1
add
ChrisLinnc1fc403
fix
ChrisLinnfbcbd6e
fix
ChrisLinn8fde83c
init hamming_distance
0xmountaintop8a134b0
add
0xmountaintop018cd5c
fix
0xmountaintop98d860b
add 2
0xmountaintop468e52d
fix
0xmountaintop0dc748d
merge
0xmountaintop54b5767
Merge remote-tracking branch 'origin/master' into dev
0xmountaintop4c10ad8
add
0xmountaintopFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletionREADME.md
This file contains hidden or 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
1 change: 1 addition & 0 deletionskamyu104/src/main.rs
This file contains hidden or 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
20 changes: 20 additions & 0 deletionskamyu104/src/minimum_moves_to_equal_array_elements_ii.rs
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Time: O(n) on average | ||
// Space: O(1) | ||
// Quick select solution. | ||
pub struct Solution {} | ||
impl Solution { | ||
pub fn min_moves2(nums: Vec<i32>) -> i32 { | ||
2 | ||
} | ||
} | ||
#[cfg(test)] | ||
mod tests { | ||
use super::*; | ||
#[test] | ||
fn test_min_moves2() { | ||
assert_eq!(Solution::min_moves2(vec![1, 2, 3]), 2); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.