Minimum Exertion Path - Coding problem | OneNoughtOne