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
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
## Major bug fix updates produced after the final release of the | |
## distribution. | |
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu | |
## team. Also, please note that software in universe WILL NOT receive any | |
## review or updates from the Ubuntu security team. |
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
use std::collections::HashSet; | |
use std::collections::HashMap; | |
impl Solution { | |
pub fn combination_sum(candidates: Vec<i32>, target: i32) -> Vec<Vec<i32>> { | |
let min: &i32 = candidates.iter().min().unwrap(); | |
let min: i32 = *min; | |
let candidates: HashSet<i32> = candidates.into_iter().collect(); | |
let mut cache: HashMap<i32, Vec<Vec<i32>>> = HashMap::new(); | |
Solution::combination_helper(&candidates, target, min, &mut cache); |
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
Computer Information: | |
Manufacturer: Unknown | |
Model: Unknown | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: AuthenticAMD | |
CPU Brand: AMD Ryzen 5 2600 Six-Core Processor | |
CPU Family: 0x17 |