That's normal, it's because a vector size is not the same type as an integer, but nevermind, it still works.
That's how security vulnerabilities, and a bunch of other problems, is born :)
In general don't worry about warnings in C/C++ (though they may provide useful information for debugging when a program if it doesn't work properly)
And what if program does not work properly in a way you haven't noticed it? Compilation logs become suddenly a topic of interest when hunting for ghost bugs :)
That's normal, it's because a vector size is not the same type as an integer, but nevermind, it still works. In general don't worry about warnings in C/C++ (though they may provide useful information for debugging when a program if it doesn't work properly), only errors are fatal for a program.
Moved tests use statements to tests module. In the unlikely event of a user solution using rand::thread_rng or rand::seq::SliceRandom there will not be a double import with this change.
Description says that the input will only contain /[a-zA-Z0-9]/, however in the random test we generate random unicode characters. By writing println!("{}", text); to the start of your solution, you will see that the random tests generate emojis, chinese symbols and stuff that the console will print as blocks.
Thanks. Approved.
I noticed that inaccuracy too. The JS version is wrong.
thanks for the feedback!
I think using the language's built in functions should be allowed. The python solution allows it's itertools permutations function as well.
I would also like to compliment you on your translation of this Kata. This is very clean, well implemented, and correct as far as I can tell.
Please reach out to me on linkedin https://il.linkedin.com/in/michaelsalaverry
That's how security vulnerabilities, and a bunch of other problems, is born :)
And what if program does not work properly in a way you haven't noticed it? Compilation logs become suddenly a topic of interest when hunting for ghost bugs :)
That's normal, it's because a vector size is not the same type as an integer, but nevermind, it still works. In general don't worry about warnings in C/C++ (though they may provide useful information for debugging when a program if it doesn't work properly), only errors are fatal for a program.
Moved tests use statements to tests module. In the unlikely event of a user solution using
rand::thread_rng
orrand::seq::SliceRandom
there will not be a double import with this change.for Rust,
Description says that the input will only contain
/[a-zA-Z0-9]/
, however in the random test we generate random unicode characters. By writingprintln!("{}", text);
to the start of your solution, you will see that the random tests generate emojis, chinese symbols and stuff that the console will print as blocks.in
test_codewarsisawersome
we get string"CODEwarsIsAWesOmE"
and expect there to be 5 duplicates.My counts are:
By this manual counting method I actually got 5 duplicates, just as the test expects.
Maybe I counted wrong or misunderstood the issue. If that was the case, please ignore this comment.
return in tuple
I made a C# solution that throws an ArgumentException when the town has a zero. The solution passes sample tests and actual tests.
I'm fairly confindent that in C# the town has no zeroes.
fixed !
... or not, the kata got locked while i was clearing the warnings, i reopen the issue
fixed !
This comment is hidden because it contains spoiler information about the solution
Loading more items...