I have been asked this question in an interview. How to solve this? The object and consoles statements are mentioned. I am not getting how to implement the function findPath