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.
Could someone explain why using
flatMap(_:)
would be preferable tojoined()
?Edit: I just ran some benchmarks and using
joined()
was almost twice as fast.Can somebody explain why it’s so common to take the closure out of the function?
I.e.,
.reduce(into: [String]()) { ... }
as opposed to.reduce(into: [String](), { ... })
While that’s helpful in this specific situation, I don’t think that’s a recommended way of using
extension
.This comment is hidden because it contains spoiler information about the solution
This runs around 10x faster than the set comparison solution. They are also not complete passes.
That makes sense, thank you so much! I just started learning 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
No tests of unmatched brackets like such: "]["