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.
kata hint != kata suggestion
You need to find better solution. You can't just count actual power to solve this kata, as this will take too much time with large numbers.
Don't give hints solutions in comments.
Print the input and see what it is. Maybe you meant suggestion instead of issue.
It would be nice if the attempt tests would tell you what they are inputting. I keep having the same error again and again, no matter how many times I change my code. If I cannot see what is being input, I cannot figure out what needs to change because I can't find out what is exactly going wrong.
look for whitespaces. You probably have some that you dont want
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Roughly saying, yes. If both of nested loops have linearly more iterations if
n
gets linearly larger, it's indeed O(n^2).Does O(n) time complexity means having just one loop? while O(n^2) have nested loops?
Yes, when you reach the second 5 you've found the first pair (
[5, 5]
) that adds up to 10 and you return it.([8,5,6,5,4,2],10)
should return [5,5] because that is closest set to the left?
What was the input value? Without it we can only guess.
What's unclear about that?
Loading more items...