Pankaj on the way!
CodeChefOpen on judge ↗
Imagine Pankaj is on a coordinate plane. Initially, Pankaj is located at the point (0,0). Its path is described as a string ***s*** of length ***n*** consisting of characters *'N', 'S', 'E', 'W'*. It is the path told by pankaj's girlfriend. Pankaj's girlfriend is standing at some location (xe,ye).You need to shorten the path of the pankaj by removing the longest sub string from the path a
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