Ad
  • Custom User Avatar
  • Default User Avatar

    This was a fun one, thanks :)

  • Default User Avatar

    Awesome, I wasn't aware that Array.from() takes a map function as the second argument. Will prove very handy in the future 🙏

  • Default User Avatar

    I love how easy Ruby makes it to do things like this ❤️

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I agree. Although the difficulty of 6kyu would be well-deserved in a language like C.

  • Custom User Avatar

    seems to be approved already

  • Custom User Avatar

    fixed

  • Custom User Avatar

    fixed

  • Custom User Avatar

    I think this is more of a 7kyu :)

  • Custom User Avatar

    This was a fun one :)

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    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 :)

  • Default User Avatar

    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

  • Custom User Avatar

    Ooo, that looks interesting. Will be sure to give it a try next time :p

  • Loading more items...