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.
Nice work, but please don't change the function signature.
Order in
unordered_set
cannot be trusted because it depends upon implementation. In C++14, odd size vectors without repeated elements get unexpected results.Learned from others:
[]byte
is zero-length slice, notnil
(same forstring
)strings.Builder
P.S. (benchmark on "Hello, World!")
What does
unwords
feel like ? :)Yes, you are right!
I benchmarked this solution and your solution with
valgrind
, found:cargo build --release
generate_shape(50)
This comment is hidden because it contains spoiler information about the solution
,p+1
is redundant,[p..]
is enoughzipWith :: (a -> b -> c) -> [a] -> [b] -> [c]
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
After debug, forgot to set
y
@for y in 0..n
to_
.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
f64.powi
is better thanf64.powf
, because:Just Couldn't come up with using
filter
!u8::max_value() == 255
&&b'H' == 72
&&b'8' == 104
.So, no overflow when
cell.bytes().sum::<u8>()
if given validcell
.Loading more items...