[go: nahoru, domu]

Skip to content

Commit

Permalink
Renamed solutions to not give hints
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-harding committed Sep 2, 2023
1 parent 6a82f99 commit 6bc8992
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/problems/_01_arrays_and_strings/_01_is_unique.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl IsUnique for Solution {
fn is_unique(string: &str) -> bool {
// Replace with your solution
use crate::solutions::_01_arrays_and_strings::_01_is_unique as solutions;
solutions::HashsetSolution::is_unique(string)
solutions::Solution::is_unique(string)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ impl CheckPermutation for Solution {
fn check_permutation(a: &str, b: &str) -> bool {
// Replace with your solution
use crate::solutions::_01_arrays_and_strings::_02_check_permutation as solutions;
solutions::AsciiSolution::check_permutation(a, b)
solutions::Solution::check_permutation(a, b)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl PalindromePermutation for Solution {
fn palindrome_permutation(string: &str) -> bool {
// Replace with your solution
use crate::solutions::_01_arrays_and_strings::_04_palindrome_permutation as solutions;
solutions::BitsetSolution::palindrome_permutation(string)
solutions::Solution::palindrome_permutation(string)
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/solutions/_01_arrays_and_strings/_01_is_unique.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::problems::_01_arrays_and_strings::_01_is_unique::IsUnique;
use std::collections::HashSet;

pub struct HashsetSolution;
pub struct Solution;

impl IsUnique for HashsetSolution {
impl IsUnique for Solution {
fn is_unique(string: &str) -> bool {
let mut set = HashSet::new();
for c in string.chars() {
Expand Down
4 changes: 2 additions & 2 deletions src/solutions/_01_arrays_and_strings/_02_check_permutation.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::problems::_01_arrays_and_strings::_02_check_permutation::CheckPermutation;

pub struct SortingSolution;
pub struct Solution;

impl CheckPermutation for SortingSolution {
impl CheckPermutation for Solution {
fn check_permutation(a: &str, b: &str) -> bool {
let mut a: Vec<_> = a.chars().collect();
let mut b: Vec<_> = b.chars().collect();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::problems::_01_arrays_and_strings::_04_palindrome_permutation::PalindromePermutation;
use std::collections::{hash_map::Entry, HashMap};

pub struct HashMapSolution;
pub struct Solution;

impl PalindromePermutation for HashMapSolution {
impl PalindromePermutation for Solution {
fn palindrome_permutation(string: &str) -> bool {
let mut letter_counts = HashMap::new();
let mut char_count = 0;
Expand Down

0 comments on commit 6bc8992

Please sign in to comment.