Company: Meesho
Difficulty: medium
Minimum Jumps in Hackerland The city of Hackerland can be represented using a grid with n rows and m columns containing an empty cell represented by a \'*\' and a blocked cell represented by a \'#\'. Traveling is allowed only through empty cells. The people of Hackerland are required to travel from a starting cell defined by the character \'S\' to an ending cell represented by a character \'E\'. The people can jump a length of any integer k in all four directions from a given cell i.e. up, down, left, and right. However, if the jump length k is greater than 1, the next jump must be made in the same direction. For example, a hacker is allowed to jump 3 units towards the right, followed by 1 unit towards the right, and then 3 units towards the left. They however cannot jump 3 units towards the right followed by 1 unit towards the left as direction change is not allowed if the previous jump was of length greater than 1. Note that the last jump in any jump sequence is always of length 1. T