Company: Dealshare_7oct
Difficulty: medium
Treasure Hunt in Ancient Ruins Problem Description You are an archaeologist exploring an ancient ruin made of N hidden chambers, numbered 1 to N , connected by M secret tunnels. Each tunnel can be used in one direction only : a tunnel (u, v) lets you walk from chamber u to chamber v , but not back. You start in chamber S , and the treasure lies in chamber D . Determine whether the treasure can be reached and, if so, the minimum number of tunnels you must walk through to get from S to D . If the treasure cannot be reached, the answer is -1 . Implement the function findTreasurePath(N, M, S, D, tunnels) , which returns this number. The code in the editor reads the input, calls the function once and prints the returned value. Equivalently, the answer is the number of chambers you enter after leaving S , counting D itself. (inferred -- the source describes the answer as the number of chambers passed through before reaching D, excluding the starting chamber, but its sample route 1 -> 2 -&