Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Brute-force solution, runs in O(n^2). Don't do this please, use a hash map instead which runs in O(n). Please, this is important for everyone.
How about asking for each digit
n
times instead of1
?Enabled in this fork
this methode needs Big brain to understand backtracking solution !
This is made by AI chat. It gave the same result. This solution also has a problem. When we have vector with letters a b a, it would return a b a as unique vector instead of a, b. Because it check only last element in result vector.
This comment is hidden because it contains spoiler information about the solution
.
This comment is hidden because it contains spoiler information about the solution
nevermind, i just found out
(a = classpoints_sumatory) (b = notes_count) (c = mynote)
a / b < c -> (b) * (a / b) < c * (b) -> a < c * b
cant get the logic behind, can u explain please?, whenever it's possible
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Description mentions caching the results, but it is not tested. Either this should be a requirement and hence tested, or should be removed from the description. If you require caching, how should
void
functions be dealt with? The description could benefit from clearer guidelines.Agreed, but I also think that even with those utilities, this task isn't trivial to do correctly. Of course, if you copy everything and turn things into lvalues, it is. But it took me 30 minutes to put together a solution that keeps value categories intact. I assumed there would be tests for that, and also the caching, but apparently not
wow, this is interesting, I didn't thought about that
Loading more items...