Mubashir has started his journey from home. Given a string of directions (N=North, W=West, S=South, E=East), he will walk for one minute in each direction. Determine whether a set of directions will lead him back to the starting position or not.
backToHome("EEWE") ➞ false
backToHome("NENESSWW") ➞ true
backToHome("NEESSW") ➞ false
N/A