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.
This comment is hidden because it contains spoiler information about the solution
I agree. Although the difficulty of 6kyu would be well-deserved in a language like C.
I'm really bad at math equations. I don't know how to express my ideas through pure math. So I didn't. I drew the street the same way the description does.
1| |6
3| |4
5| |2
I imagine I'm looking at a map (bird's eye view). I imagine driving from the south of the map to the north. You'll always know the first house on the left, and the last house on the right with the info they give us. I focused on that. I picked one side. What's going on the left side? What happens in real life when you're looking at addresses? The same thing. You notice the address changing the number. One side is even, one side is odd (in my area, the houses change by 4). So how much are they changing on my drawing? I'm not worried about writing a clean one line math equation. My code even has an even side, and an odd side and it still works with out using a giant list. You don't have to worry about making the cleanest smartest mathemetical code. Break it down how you as a human solve the answer.
I'm in my car driving from the bottom of the map, to the top. I am looking on the left. I know how many houses are on this block and that odds are always on the left. How much is the number changing and in which direction? This is the approach I took that helped me.
-Signed, someone really bad at math
I'd also recommend putting any pattern into https://oeis.org/
I'm similar tbf. One trick I use is - if there is just one input - to plot the input and output on a graph. You can then see if there is an obvious solution :)
Same here. And I have been writing JS for more than half a decade now..
Thanks! :)
Well, it's actually some pretty basic JavaScript. Did you try with some for loops and a count variable that you'll return?
This resource should be helpful: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
It is a useful method that you can use to solve this challenge. 🙂
Haha it took me 10 seconds.
Kata ranks cannot be changed.
thank you
The rankings for kata are all over the place. What you have to know to actually code the solution for this is 8 kyu as it is a simple string return. But figuring out the amount of each is harder. A lot of the Kata's are very algorithm specific. If you have solved a similar problem before they are trivial, if you have to come up with a solution they can be very difficult.
Me too... But the "higher species" decided in a different way.))
@sajadtorkamani .. Ooooh Boy , I miss your comments Sajad , The last time commented you were 4kyu
Loading more items...