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.
Damnit I spent so long looking for an equivalent function for nCr and it was right there 😔
You can use the inclusive range operator ..= rather than .. to get rid of the +1
This comment is hidden because it contains spoiler information about the solution
Hey, samesies! I don't quite see the point of converting the vec to a tuple, since it just changes how you access the elements, but eh
Probably because this was written many years ago, and there was no built-in implementation of
IntoIterator
for[T; 13]
at the time.that's right, check out the fork
Why would you do
for &(n, symbol) in symbols.iter {
instead of justfor (n, symbol) in symbols {
?You know I feel like that array could've been constructed somewhat more concisely. You never know though
yeah, how it is now doesn't match the description
Equal functions should result in False because some intersection points are outside the interval (unless the interval is all real numbers).
Great puzzle, but the description needs to be more clear on what is expected, maybe adding some more examples of expected output. Specifically, that two equal functions should return True, and two functions that don't intersect should return False.
This comment is hidden because it contains spoiler information about the solution
Yeah, how returning pointer to stack got top score in best practices is beyond me...
Instead of breaking just to return list straight after, you can just replace
break
withreturn list
This comment is hidden because it contains spoiler information about the solution
Unused memory isn't leaked. There's just a bunch of undefined bytes after the null byte. It still gets freed when the memory is freed using free, since the OS keeps track of the number of bytes allocated when you call malloc.
Imagine if this was an int array not a char array, a 0 in the middle of the array wouldn't cause any memory to leak.
Loading more items...