Thank you both for spending your time on providing a more clear explanation.
@awesomead - the code was indeed buggy. I'm currently learning to code in RUST and things are much more different than with other languages (in a positive way, I'd say).
P.S. - Once I submitted a working variant of my code and saw the solutions of other people - I realized how much more there is to learn. The positive thing here is that I already received some feedback about the fact that very often "clever" solutions are much more difficult to debug in the future... I gues that depending on the point of view - there might actually be some positives to writing without too much of syntactic sugar.
I've written the code that solves the kata in RUST (I tested it manually with different number combos), but when I "Attempt" the kata officially >>> I get the following result(s):
This comment is hidden because it contains spoiler information about the solution
Hi Guys,
Thank you both for spending your time on providing a more clear explanation.
@awesomead - the code was indeed buggy. I'm currently learning to code in RUST and things are much more different than with other languages (in a positive way, I'd say).
P.S. - Once I submitted a working variant of my code and saw the solutions of other people - I realized how much more there is to learn. The positive thing here is that I already received some feedback about the fact that very often "clever" solutions are much more difficult to debug in the future... I gues that depending on the point of view - there might actually be some positives to writing without too much of syntactic sugar.
Enjoy the rest of the day / week.
Cheers,
Hi Guys,
Can someone please help me?
I've written the code that solves the kata in RUST (I tested it manually with different number combos), but when I "Attempt" the kata officially >>> I get the following result(s):
=============================================================
tests::test_big
assertion failed:
(left == right)
left:
3021499
,right:
31499
tests::test_random
called
Result::unwrap()
on anErr
value: ParseIntError { kind: PosOverflow } at src/lib.rs:53:43tests::test_real
assertion failed:
(left == right)
left:
3
,right:
13
tests::test_silly
Test Passed
I checked the tests which the creator has made, and it seems that he / she / they are testing 2 different functions:
Here is what I mean:
#[test]
fn test_real_add() {
assert_eq!(add(2, 11), 13);
assert_eq!(add(0, 1), 1);
assert_eq!(add(0, 0), 0);
}
#[test]
fn test_silly_add() {
assert_eq!(add(16, 18), 214);
assert_eq!(add(26, 39), 515);
assert_eq!(add(122, 81), 1103);
}
This comment is hidden because it contains spoiler information about the solution
Hi,
I have the same question as Alexander.
The wording used in the "Deatils" states >> "a boolean true if ALL rotations of strng are included in arr (C returns 1)"
How comes a string which contains only 4 of the possible rotations gives us a result of: true? :(
Regards,
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution