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.
Neat code, but relies too much on java built in library. Hard to maintain.
Ok, thanks for the answer! :)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Big O notation is used to discuss how things grow as the dataset gets larger. It is not strictly limited to runtime, and is never in fact measuring runtime. It is simply a way of mathematically approximating how things grow.
It can be used to talk about the number of operations performed, number of comparisons used, memory required, memory allocations, etc. Its all in how you slice the code and determine what the most costly factors are. Whatever is most costly will generally have the biggest impact on runtime/performance.
In this case, memory allocations are the most costly part of the algorithm. And making 1 allocation, versus 3N + 1 allocations is the part that effects both the runtime and memory usage the most.
Its been months since you reply but if you are still wondering when we measure how much time it takes for an algorithm to finish, we do not measure in time but in O(n), you can search the Big O notation(if u havent already) and youll see. btw if im wrong someone correct me im a newbie aswell.
i see everyone talking about 'O(N)' and that kind of stuff what does it all mean. i am a newbie by the way.
lol obviously.
This comment is hidden because it contains spoiler information about the solution
If N is the number of words in the original string. Then this version requires O(N) array allocations.