Unravelling Dimensions
CodeChefOpen on judge ↗
Lokesh lives in an infinite 2D space at (0, 0) and is getting bored at his place. Therefore, he decides to travel. His mother being very strict gives him a specific route in a form of a string $S$ using which he can only travel in left, right, up and down directions (he can travel only one unit distance at a time) mentioned in a string as ('L', 'R', 'U', 'D'). His friend Vaibhav decides to prank h
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start