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.
good job
Thank you. Your advice not to use pow helped me.
So far the most satisfactory kata to get through. thoroughly enjoyed!
To anyone struggling with testcase 6, the reason why it fails must be related to the use of the pow(x,y) function from . It is not a long long int. and thus will return errounious values.
What no nut november does to a man
@Chrono79 : Yep that's why I asked, that's the whole point of my question :) ty
Yes after 2 hours of braintraining finally solve this (^_^)
You can always print the input, read this: https://docs.codewars.com/training/troubleshooting/#print-input
For javascript use
console.log(valueYouWantToPrint)
. Your logic about this problem is wrong, it's not you should always backtrack the path you've made, you can go back to the start following a different path.thanks for your answers!
I can print() the input in the last part of the tests? Not the first 4?
You can always
print()
the input and your output to see what's going on.Instead of a set of instructions, think of it as a grid, follow the different examples and see if you can find a pattern of the ones that return to the original point.
Hi there!
Just asking for a clearification here. The function should check if the walk take the user back to his starting point. Does it only need to check if the second half of the array is the exact opposite of his first half? Or it need to calculate any itinerary possible?
For exemple:
["n", "w", "n", "e", "n", "s", "e", "s", "w", "s"] is valid althrough the second half of the array is not the exact opposite of his first half.
My code doesn't pass half of the finals tests and I cannot see what is the array inputed in the function to test it = I can't really see my error. If someone can enlighten me it would be mucho apprecio, sorry for me being a n00bcoder like that I'm in the learning process :p
Very fun to get through :) loved this kata