Flipkart | Interview PSDS round
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2023-10-06Added By Anonymous
Source: Link
Company: Flipkart
Role: unknown
Stage: unknown
Location: unknown
Year: unknown
Given a nxm matrix. Given a character 'A' you have tell if there exists a path to reach the right bottom cell. Matrix has some obstacles G you cant cross. you can move in 8 directions. Time complexity should be O(m+n) / O(m*n). . . . G . . A . . . . G . . . . . . . G . . . . Optimization: There is a charater S with superpower. If you encounter S you can skip the whole row. Hint: To collect the location of all G and S which will take mn. After that the function to find if path exist can be done in O(m+n)
Role: unknown
Stage: unknown
Location: unknown
Year: unknown
Given a nxm matrix. Given a character 'A' you have tell if there exists a path to reach the right bottom cell. Matrix has some obstacles G you cant cross. you can move in 8 directions. Time complexity should be O(m+n) / O(m*n). . . . G . . A . . . . G . . . . . . . G . . . . Optimization: There is a charater S with superpower. If you encounter S you can skip the whole row. Hint: To collect the location of all G and S which will take mn. After that the function to find if path exist can be done in O(m+n)