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.
Study Big O Notation.. It's not as hard
basically think of it like this O(1) would be going the same speed no matter how many items inputted into the function, O(n) is the time it takes to complete the function is linear with how many items is inputted. so if we went through the items twice, it would be O(2n). and as shown above we have one loop inside another. meaning we go through that second loop multiple times and the outside one once. you would find this to be O(n^2) so say its 1 second per item for O(n), in the O(n^2) 6 items would take 36 seconds, 8 would take 64 seconds, etc, etc. kinda lengthy but i hope it helped
basically think of it like this O(1) would be going the same speed no matter how many items inputted into the function, O(n) is the time it takes to complete the function is linear with how many items is inputted. so if we went through the items twice, it would be O(2n). and as shown above we have one loop inside another. meaning we go through that second loop multiple times and the outside one once. you would find this to be O(n^2) so say its 1 second per item for O(n), in the O(n^2) 6 items would take 36 seconds, 8 would take 64 seconds, etc, etc. kinda lengthy but i hope it helped
How can I measure the O( ) of my code?