4 kyu
Path Finder #4: where are you?
140 of 683evk
Loading description...
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
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.
Either I misunderstood, or the test cases (python) no longer have the letter
L
after the first 6 tests.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.
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! :-(
Can anyone tell me why 'global' ,I tried 'local' in i_am_here and can't pass test
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.
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! 👏
Once it clicks, this kata is extremly easy
I agree!!
Cool kata.
Thanks to the author.
Thanks also to all the commenters.
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.
This comment has been hidden.
In fact, your suggestion is also not entirely accurate. Something and something can be the same thing, but it can also be the opposite. But the result of doing this something in both cases will be the same.
Good luck to everyone!)
I think the better question to have is about whether the instructions given are consistent throughout the whole input, or whether it can change based on the order of the instructions, or what else. I am still confused and have given up on trying to solve this though lol
No need to complicate it. The casket opens quite simply . )
Good luck!
This comment has been hidden.
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. ;-)
Here's some help. Imagine these instructions were given to a robot, how would a robot interpret these instructions to move to a required position? As MrCookies78 has said, the position of the robot isn't reset between function calls. If you're using python you can type "Ctrl + Enter" instead of "Enter" to run all the tests, giving you more tests to look at to test your theories.
Thanks RevRift. I already noticed that the robot took off from where you left it. Somehow my brain got stuck with the idea that r(ight) and l(eft) vs capital R, L are absolute vs relative motions, or the other way around. That doesn't seem to work.
Anyway, it's been two months since my last try. Let's give it another go.
a little drawing might help you
If you don't want to wrack your brain - better skip this kata
Agreed, and Not!! just like the kata
This comment has been hidden.
Read this: https://docs.codewars.com/training/troubleshooting/#works-but-no and see if it helps.
This comment has been hidden.
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.
(message deleted)
aaaand now i'm super-glad i gave this one a pass.
Excellent kata! No description, just a few test cases... Have a big pleasure while solving it. Would recommend to my friends, thanks for fun!
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
Hi,
Sorry, but that's specifically what you're supposed to find on your own. ;)
Good luck
Okay, PUZZLES, I get it!)
I did it, I'm not proud of my decision at all, this kata devastated me!:)) But it worked and I was too lazy to improve anything after I saw the cherished submit)) It was definitely a fun experience, but I wouldn't do it again. Good series of katas
This comment has been hidden.
Is class Point supposed to be part of namespace System.Drawing ?
Very strange kata.
This comment has been hidden.
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.
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
C++ tests generate warnings.
Fixed
Very nice puzzle !
Small hint : no fancy algorithm, just remember you are lost ...
「Why it get different output by same input?」
When I'm playing chess,and move knight...
「Oh, I Got it」I say.
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:
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!
This is one of a kind, in the katas I've done, brilliant !!!
This comment has been hidden.
it's like that in all languages. Hence it is the actual task to solve. closing. ;)
Yes for the 2nd point, no for the 1st.
mmmh... Maybe for the first point, yes (I misread your sentence, sorry) Could you be more precise? Sample tests? or just not enough tests in the full test suite? In what language are there more?
Sample tests. In C# for example the 4th test on top of the 3rd allows to get the idea (and the last 2 are redundant).
This comment has been hidden.
Pretty dissatisfied with having 4 different commands. Was easy, but illogical.
just means you didn't get the logic behind ;) (because there is)
This comment has been hidden.
Your decision is impressive. Understanding complex numbers is something I need to work on.
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.
not that much of a hint but...
this is wrong.
Pay attention to the fact that with several times the same input, different results may be expected, too.
This comment has been hidden.
@Blind4Basics, how do you know that several times the same input gives different results?
Let me tell you: this was amazing. Definitely one of my favourites!
For anyone who is wondering - everything in this kata is correct.
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.
any hint?
You can start by looking input output, and see that even though input is the same sometimes outputs are not the same.
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.
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!!!
I don't see any task, only "Hey, Path Finder, where are you?".
that's the idea, yes... x)
So... any hint? Can't make absolutely any sense of it in this form.
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.
there are no performances requirements, here. So I'd say you didn't understand what to do with the data?
Ooops, sorry, this comment applied to Pathfinder #1, not #4 - I'm not sure how I manged to post it here! Can you delete it?
nope, not anymore x) (the first comment of a thread is the only removable one, but only as long as there is no answer. So.... too late x) )
This comment has been hidden.
C# Translation, (actually, my first translation) would you mind taking a look?
.
This comment has been hidden.
@evk: did you see that a ruby translation is pending? Why didn't you approve it?
approved.
Why are there 2 Java versions?
"CW feature"... x) (meaning, it's a bug. That happens when the translation is approved by two persons at the same time, iirc. For you, that shouldn't change anything)
Okay, thanks
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)
.
C++ Translation added, your review will be appreciated :)
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.
Approved! It's great series :)
I really like the way this puzzle tells the story, instead of having any instructions. 👍
Two tests with same input have different expected result?
Tag:
puzzles
;-)(It shouldn't be hard to conceive why, by the way)
Thought the same, definitely not a funny puzzle.
This comment has been hidden.