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.
Because there's no need to create another copy of
str
.string str : is a fixed, read-only string stored in memory. You cannot modify it. so it is more correct and safer to be (const) char[]
its better to reserve space for elements and emplace_back elements
...for what reason exactly?
Maths are much better for performance than just bruteforce.
Work smarter, not harder.
Great Solution!
how the hell this finish in time
one of the favoriate solution that I've seen
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.
I wouldnt worry about debuggability for total 4 lines of code
This comment is hidden because it contains spoiler information about the solution
creative
huuuuuuuuuuuhh i still didnt learn pascal triangle (11G) and when i see solutions like this i feel like that i overthink stuff, what should i do?
.
Bro, i felt so dumb after spent almost 10min trying to solve it lmao. But, at least, im learning something instead of playing something ;-;
This comment is hidden because it contains spoiler information about the solution
Loading more items...