Ad
  • Custom User Avatar

    The items in the array are directions, not positions.

  • Default User Avatar

    bruteforce is possible too

  • Default User Avatar

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

  • Default User Avatar

    What helped me, is not to view the problem as an image of boxes placed in staggered manner, but rather sequnce of numbers. Then it is easier to see the solution (Dont overly complicate the solution, because it is much easier than what it seems)

  • Custom User Avatar

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

  • Custom User Avatar

    Click Reset, and try again.

  • Custom User Avatar

    closing

  • Custom User Avatar

    Your code is wrong, not a kata issue, it only replaces a single !.

    Write function RemoveExclamationMarks which removes all exclamation marks from a given string.

  • Custom User Avatar

    Think about what the best number of steps for the cat to jump is in each possible scenario.

  • Default User Avatar

    Hi - first of all, please don't use Issue tag; that is reserved for problems with the kata - if you have problems with your solution use the Question tag.

    Secondly, I don't use JavaScript (#blessed) but I'm guessing that the method you are using will encounter problems with very large arrays - your "big number" probably isn't big enough to break your code: the random tests involve values of n = 9876543210 so try in VSCode to see if such an input works with your current solution (it won't).

  • Custom User Avatar
  • Custom User Avatar

    Read the description more carefully, the houses are numbered in opposite directions.

  • Default User Avatar

    I can't answer your question with the correct "words" because then it will spoil the kata for other people, so let me try to explain as best as I can:

    Without seeing your code, I'm guessing that the way you implemented the thing_you_mentioned_in_your_question is using the basic "naive" approach (probably involving recursion?).

    If you are a beginner, this will be a very valuable teaching/learning experience for you so, all I will tell you (this is a 5 kyu kata so it is supposed to be a bit challenging) is: there are better ways of implementing the thing_you_mentioned.

    In fact studying thing_you_mentioned is a classic example used in many programming textbooks, so you should find lots of detailled explanations with some simple internet searching.

  • Custom User Avatar

    Fixed. About the timeout, could be your code, make sure you don't have an infinite loop.

  • Custom User Avatar

    You should read the description again. It says that you should take as much big pieces as possible to reach the goal. Your second if statement clearly breaks that rule. Also some of the other conditions seem nonsensical.

  • Loading more items...