Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
Technically not needed but I find it more readable this way.
  • Loading branch information
1Git2Clone committed Nov 17, 2024
1 parent 3cb5186 commit f900e34
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 11 deletions.
40 changes: 32 additions & 8 deletions src/hw1/task_1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,38 @@ const MAX: u32 = 100;
/// ```rust
/// use hackerrank::hw1::task_1::Solution;
///
/// assert_eq!(Solution::main(2, 8), String::from("1000"));
/// assert_eq!(Solution::main(2, 34), String::from("100010"));
/// assert_eq!(Solution::main(2, 1), String::from("1"));
/// assert_eq!(Solution::main(8, 22), String::from("26"));
/// assert_eq!(Solution::main(8, 34), String::from("42"));
/// assert_eq!(Solution::main(16, 34), String::from("22"));
/// assert_eq!(Solution::main(16, 12), String::from("C"));
/// assert_eq!(Solution::main(17, 5), String::from("Invalid input data!"));
/// assert_eq!(
/// Solution::main(2, 8),
/// String::from("1000")
/// );
/// assert_eq!(
/// Solution::main(2, 34),
/// String::from("100010")
/// );
/// assert_eq!(
/// Solution::main(2, 1),
/// String::from("1")
/// );
/// assert_eq!(
/// Solution::main(8, 22),
/// String::from("26")
/// );
/// assert_eq!(
/// Solution::main(8, 34),
/// String::from("42")
/// );
/// assert_eq!(
/// Solution::main(16, 34),
/// String::from("22")
/// );
/// assert_eq!(
/// Solution::main(16, 12),
/// String::from("C")
/// );
/// assert_eq!(
/// Solution::main(17, 5),
/// String::from("Invalid input data!")
/// );
/// ```
pub struct Solution;

Expand Down
10 changes: 8 additions & 2 deletions src/hw1/task_2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ const MAX: u32 = 100;
/// ```rust
/// use hackerrank::hw1::task_2::Solution;
///
/// assert_eq!(Solution::main([24, 40, 64]), String::from("8"));
/// assert_eq!(Solution::main([23, 25, 26]), String::from("1"));
/// assert_eq!(
/// Solution::main([24, 40, 64]),
/// String::from("8")
/// );
/// assert_eq!(
/// Solution::main([23, 25, 26]),
/// String::from("1")
/// );
/// assert_eq!(
/// Solution::main([5, 25, 60]),
/// String::from("Invalid input data!")
Expand Down
5 changes: 4 additions & 1 deletion src/hw1/task_3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ const MAX: u32 = 100;
/// ```rust
/// use hackerrank::hw1::task_3::Solution;
///
/// assert_eq!(Solution::main([10, 20, 30]), String::from("60"));
/// assert_eq!(
/// Solution::main([10, 20, 30]),
/// String::from("60")
/// );
/// assert_eq!(
/// Solution::main([9, 10, 20]),
/// String::from("Invalid input data!")
Expand Down

0 comments on commit f900e34

Please sign in to comment.