Ad
  • Custom User Avatar

    Fixed.

  • Custom User Avatar

    Why is this an issue? its more of a suggestion.

  • Custom User Avatar

    Cockroaches firstly run in a straight line in the direction they are facing
    When they hit a wall they always turn LEFT and then they follow the wall until they can find a hole to crawl into!

    I think the rules are already self-explanatory. It seems you only got into trouble by imagining other cockroach behaviours (like looking around at the scenery while they are running) which are not part of the rules at all...

    but able to see normally elsewhere?

    It doesn't "see" anything. The cockroach runs in a straight line, hit a wall then turns left until it gets to a hole. That's it. Its little buggy eyes are closed because of the bright lights.

  • Custom User Avatar

    I don't understand how random tests are supposed to work,

    By exactly same Kata rules.

    shouldn't roach R on the last line be able to?

    Why?

    That cockroach will head RIGHT (as you look at the floor). Then it will hit the right-side wall. Then it will turn left (from the bugs POV) which means it will go into hole #2

  • Custom User Avatar

    There is no such test case. Probably you were mutating the input.

  • Custom User Avatar

    The last 3 pairs aren't consecutive perfect squares. Not a kata issue.

  • Custom User Avatar

    What don't you understand exactly? What would you expect? Please be more specific.

  • Custom User Avatar