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.
Closing as this is not a proper kata issue.
It has to be exactly 10 minutes
This comment is hidden because it contains spoiler information about the solution
The only thing that matters is that your start and end points are the same. So you can pick whatever origin point you like.
How do i do the logic for finding the starting point?, Please help me D:(
That doesn't solve the problem, you want the path to start and end at the same point, what you're doing would return true for a path like this:
['n','n','n','n','n','n','n','n','n','n']
where you can easily see you end at ten blocks from where you started.Those are two different conditions that the path must comply for your function to return true. What other meaning do you think it could have? I don't think that's a kata issue.
The instructions are not very clear. Not sure what this sentence: "so create a function that will return true if the walk the app gives you will take you exactly ten minutes (you don't want to be early or late!) and will, of course, return you to your starting point" is trying to say. Are those 2 different conditions? Or all equations will return you to the starting point - if so, what is the point?
I am a bit confused. I split the array into 2 - one with the first 5 directions and the other with the last five. Then I reversed the array for the first five and compared it with the last five - "to return to the same direction". I am getting an error on the last test case (should return true if walk is valid). Why is this?
Just kidding I read the output in the console backwards. No kata issue here!
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 was very fun, thank you.
Draw a grid on a piece of paper and place a starting point on it, there you can experiment and test whether your logic is correct as well as find the solution.
Does that take ten minutes?
Loading more items...