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.
the same solution
This was a fun one, thanks :)
Awesome, I wasn't aware that
Array.from()
takes a map function as the second argument. Will prove very handy in the future 🙏I love how easy Ruby makes it to do things like this ❤️
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.
seems to be approved already
fixed
fixed
I think this is more of a 7kyu :)
This was a fun one :)
This comment is hidden because it contains spoiler information about the solution
Hey, thanks for giving a detailed explanation of your approach. I really appreciate it. I like your approach and think it's a good one.
I've also found over the years that it often helps to try and model my human thinking to code as much as possible. I too often forget this and try to write some beautiful and perfect solution the first time :)
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
Ooo, that looks interesting. Will be sure to give it a try next time :p
Loading more items...