There are a few problems has vague descriptions which is quite confusing that make the contestants to submit multiple of time to "guess" or "try out" what is the real meaning of the problem.
It's remotely what we want in Leetcode. So please STOP making this kind of problem again. It's no more than a waste of our time.
@mail.kuuy I agree... my solution was flagged as incorrect though it fulfilled the requirements of the original question. If it's meant to END as a circle please state that.
Don't listen to the haters leetcode, this question was impeccable just like all the others. You think questions will be absolutely 100% spot on in the real world? You jokers if I were your manager i'd fire you on the spot for incompetence.
"impeccable"? "like all others"?
Seriously dude, this problem is for a contest, if you can't spot on what you want "absolutely 100%", i have to say you are f__king around with all the contestants and wasting their time and intelligence. I guess you can't feel exactly the same way because your time is worthless and you don't have any intelligence.
FIre someone for incompetence? I have no idea why you have that confidence to speak out that words, and it makes me laugh. Maybe you can change your ID to "slavery", it's "absolutely 100%" suitable for you.
Mmm, this problem description should be clearer like:
"Initially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means after doing all moves, it moves back to the original place."
I got rejected for the case of 'DURDLDRRLL'.
In the step 2 of 'U', the robot moves back to the original (0, 0) position. If we judged a circle move at the step 2, however we would be rejected because in fact the problem only cares about the final position of that robot.
Not saying this is a bad problem but it should be clear on the description. Consider an extreme case of 'URDLURDLURDLURDLURDLURDLURDLURDLL'. That robot would be like circling all the way before the last 'L' move.
It is unclear that it should end on a circle. If I did not see this post I would not have known that. Seems silly to me, the only way to clarify this would be to ask but you cannot do that on a website like this.
I agree with Fisher, problem is unclear about the endpoint. My Original code breaks when the robot traverses any circle in the path. My second iteration returns the outcome of the entire path traversal, which seems to be congruent with the expected answer.
Unclear about the problem..
What about LLLL ? did it circle or not.. I am very unclear..
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.