Ad
  • Custom User Avatar

    Loved loved loved this kata. Learned a lot! Thanks!

  • Custom User Avatar

    Very complete and educational exercise! Cheers!

  • Custom User Avatar

    Loved the concept and the kata itself! <3

  • Custom User Avatar

    This was more of a 5 kyu kata for me for sure! Learned a lot. Thank you! Hope the series goes on! It's been pretty fun to think of these problems on the way home from work and then rushing to try a new approach (even if it fails miserably haha). Thanks!

  • Custom User Avatar

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

  • Custom User Avatar

    Great Kata. Suggestion: the description should note that not only are there invalid strings, but also NULL pointers in the test cases. Given the nature of the scenario, being a website and all, it stands to reason that you'd always be passed a valid pointer, even if it's an empty string. I kept getting memory errors in C, which sadly don't show any debugging text you may be producing to aid in your solution. I had to create a global counter, manually count which test was causing the memory problem and hardcode a condition for that test in order to see what the input parameter was. I'm no expert by any means, but that was incredibly frustrating and unnecessary, in my opinion. Otherwise, as I said, great kata!

  • Custom User Avatar
  • Custom User Avatar

    Did this in C. So far, most of the katas I've completed by this author are apt challenges for beginners, but if you're into optimization and/or ninja-like brevity, you can also spend a lot more time working on a simple and elegant algorithm. It was incredibly satisfying noticing my solution was essentially the same as the author's. Love them! Keep at it, friend!

  • Custom User Avatar

    Hi! The tests say: // try "Attempt" to find more... But if you "Attempt", you only get to see one more test. Are we meant to hard-code a passing solution every time we discover new test in order to be able to see more of them and possibly identify the pattern? Is there another way to see all the tests?

    For a 7 kyu, I'm embarrassingly lost. Any help would be appreciated!

  • Custom User Avatar

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

  • Custom User Avatar

    Gorgeous solution. Great job!

  • Custom User Avatar

    Feedback, using C:

    • The instructions make it unnecessarily difficult for someone who's never played this game before. I had to go out of my way to research the logic and "translate" (for lack of a better term) the instructions for them to be coherent.
    • For instance, it says: "The test cases will call the method play(die1, die2) [...]" -- yet it actually calls snakes_ladders(die1, die2). So it seemed logical to assume that a) play() is implented somewhere in the testing framework or b) one has to implement it oneself.
    • It doesn't explain what triggers the start of a new game. Thinking consistently with the other katas I've completed, it was hard for me to figure out that each call in the test code was part of the same game. It made debugging unnecesarily tedious -- had to printf the crap out of it.

    Essentially, I feel like I spent more time figuring out the instructions than actually writing the solution. Once I understood, the solution was enjoyable to write. Hope this feedback helps!

  • Custom User Avatar

    I envy your ability to solve this challenge with a succint mathematical expression! Much respect!