Company: nagarro_18aug
Difficulty: medium
Need for Speed Problem Description You are in a racing competition with no rules. A trophy is awarded to the first person to reach the final position. There are numerous routes that run through various cities. Nitro boosters, sand pits, crash sites and cops may be found on some routes. It takes one hour to travel from one city to another. Nitro boosters will double your speed for the next two routes. Sand will reduce your speed by half for the next two routes. Crash sites are routes where crashes occur frequently, and it takes one hour to safely drive out of a crash site. If you come across a cop on any route, you are automatically arrested and will not be able to proceed further. You are given a number of cities N, an array representing the special powers associated with each city, the total number of routes R and a 2D array of R * 2 representing the possible routes that could be taken to travel between the cities. Your task is to find and return an integer array representing the path