4 kyu

Path Finder #4: where are you?

140 of 683evk
Description
Loading description...
Puzzles
  • Please sign in or sign up to leave a comment.
  • BadZen Avatar

    This one lost me, zero interest. "Puzzles" like this where you're "let me begin by printing out all the test case data" are always bad IMHO.

  • Anchous Avatar

    Either I misunderstood, or the test cases (python) no longer have the letter L after the first 6 tests.

    for _ in range(random.randint(2, 12)):
        direction = random.choice('Rlrl')  # should be 'RLrl' instead of 'Rlrl'?
    
  • fragged_again Avatar

    The very definition of test-driven development! The description is lost just like you, but you don't need it. Just go and pass the tests.

  • Quark Fox Avatar

    Alhamdulillah! Done it!! Really really Thanks to evk, what a beautiful idea to test patience!! Agitating Kata, really, of course until you get it!! Makes you unconfortable if you really wanted to complete the series!! this was my last one because, next one is only for JS! :-(

  • zxc-moonwei Avatar

    Can anyone tell me why 'global' ,I tried 'local' in i_am_here and can't pass test

  • triplelindy0708 Avatar

    I don't see any description in the details. Are we supposed to reverse engineer the task from the tests? Love this series, but not sure why the description in this one doesn't describe the kata.

  • LukeGarrigan Avatar

    I won't go into too much detail on how long this Kata took me, but I now have a beard. This Kata completely caught me off guard, I thought I'd be implementing A* or something given the series, thoroughly enjoyed though! 👏

  • xenois Avatar

    Once it clicks, this kata is extremly easy

  • Aliaksandr-Borsuk Avatar

    Cool kata.
    Thanks to the author.
    Thanks also to all the commenters.

  • wdos3 Avatar

    I genuinely have no idea what's going on with the instructions. There are so many inconsistencies with what's different between r and l, and r and R. I have been operating on the premise that one's supposed to be "walking but not turning" and one's "just walking", but it doesn't fit. At least, r and l isn't the same thing, and so is R and L.

  • fishjam Avatar

    This comment has been hidden.

  • Kees de Vreugd Avatar

    I can't believe 439 code warriors up to date were able to solve this monster. I even saw one writing it was easy. I've been revisiting this Kata three or four times in the past two years or so, and I still don't get it.

    Feeling stupid. Thanks. ;-)

  • cw_RekRul_cw Avatar

    If you don't want to wrack your brain - better skip this kata

  • cw_RekRul_cw Avatar

    This comment has been hidden.

  • MrCookies78 Avatar

    Here we have tests with same input but different outputs. I assume this is because position is not reset between test cases (?). But the point of test cases are to be unequivocal, test cases' output being affected by their own order seems wrong to me, it should be addresed in another way; like the input being an array or having to define a class with X method instead of a function.

  • Slovo Tverdo Avatar

    Excellent kata! No description, just a few test cases... Have a big pleasure while solving it. Would recommend to my friends, thanks for fun!

  • seniorCrutchDeveloper Avatar

    mmm, what it means?: input - 10r5r0 should equal - [-10, 5] logic suggests that it is "10lr5r0" or it's "10r-5r-0"

    I need help, please, any explanations, I don't think it's a mistake, but I don't want to guess I didn't see anything else like that in the tests

  • GGNiger Avatar

    Is class Point supposed to be part of namespace System.Drawing ?

  • Alphred Avatar

    This comment has been hidden.

  • AlexTheFirelord Avatar

    That was funny but a bit confusing at the beginning :) The first time when checking logs on Codewars was really useful for me to complete the task.

  • Duong_Nguyen Avatar

    When it comes into the Java testcases, it has more testcases then c++ testcases and python testcases, I think we should make it equal so that we could solve it. I solve it by c++ in the first place but I couldnt find the pattern because There werent enough testcases

  • FArekkusu Avatar

    C++ tests generate warnings.

  • RealKenshiro Avatar

    Very nice puzzle !

    Small hint : no fancy algorithm, just remember you are lost ...

  • HeySunBoy Avatar

    「Why it get different output by same input?」

    When I'm playing chess,and move knight...

    「Oh, I Got it」I say.

  • alexc19 Avatar

    I have mixed feelings about this kata. I like katas that are well specified and this is not, though I appreciate that it was the very intention of the author.

    My annoyances:

    • The previous katas in the series are a nice, progressive introduction to path finding algorithms, and this diversion kind of spoils the series.
    • Test cases are influenced by previous results: this in my view breaks a basic principle of how Codewars should work.
    • A kata description should always be self contained even if the kata is part of a series.

    That said, I also enjoing coding the solution, I quickly figured out the meaning of the "commands" in the input path and learnt useful regex patterns to tokenize the input. Thanks!

  • kuchaguangjie Avatar

    This is one of a kind, in the katas I've done, brilliant !!!

  • Baha2490 Avatar

    This comment has been hidden.

  • YuanTan Avatar

    This comment has been hidden.

  • MasterMedo Avatar

    Pretty dissatisfied with having 4 different commands. Was easy, but illogical.

  • mandyedi Avatar

    I really like this puzzle, but it also drives me crazy... I found out that in every test, the position is changed based on the input data. First I thought that it is something like r/R move on x axis, l/L move on y axis. But when there are same inputs one after the other, we shouldn't be in the same position (with this logic). Could anyone give me a little hint, please.

  • Roboreptile Avatar

    Let me tell you: this was amazing. Definitely one of my favourites!

    For anyone who is wondering - everything in this kata is correct.

  • lonkaan Avatar

    It was fun to figure this out. After solving path finder 1,2,3 I definetly expected some graph related thing but it surprised me.

  • kitty-biznis Avatar

    I liked the first 3 but this kata doesn't fit in the series. Puzzling might be fun but getting no instructions at all is frustrating.

  • fjw Avatar

    Oh no. I got on the wrong track because I could solve the first test with a complete different solution. But then it seems I wasn't able to step back and rethink from scratch again. I gave up and unlocked the kata. What a shame. This is a great kata!!!

  • Rediska.RnD Avatar

    I don't see any task, only "Hey, Path Finder, where are you?".

  • widelec9 Avatar

    So... any hint? Can't make absolutely any sense of it in this form.

  • RobinBennett Avatar

    How fast do my solution have to be to pass? On my local machine it's solving a 100x100 maze in 300ms, but it still times out when I submit it.

  • cocoderrr Avatar

    This comment has been hidden.

  • kristoverek Avatar

    C# Translation, (actually, my first translation) would you mind taking a look?

  • sipubot Avatar

    This comment has been hidden.

  • Blind4Basics Avatar

    @evk: did you see that a ruby translation is pending? Why didn't you approve it?

  • a.2.c.4 Avatar

    Why are there 2 Java versions?

  • Blind4Basics Avatar

    Java translation, please review and approve.

    cheers

    (note: I put the 6 fixed tests in the sample tests: the 3 provided originally clearly aren't enough, so I don't see the point to not give the other ones)

  • smokinhiro Avatar

    C++ Translation added, your review will be appreciated :)

  • tsnee Avatar

    Great kata! It's a shame that it's only available in one language. I've tried to translate it into Python - why don't you take a look at my humble effort? I would love to hear your feedback.

  • dcieslak Avatar

    Approved! It's great series :)

  • ba78 Avatar

    I really like the way this puzzle tells the story, instead of having any instructions. 👍

  • dinglemouse Avatar

    Two tests with same input have different expected result?

     Log
    path="r5L2l4"
    Test Passed: Value == '4,3'
     Log
    path="r5L2l4"
    r5L2l4 - Expected: '0,0', instead got: '4,3'