Grab India dsa round questions

Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2021-08-12Added By Anonymous
Source: Link
Company: Grab Role: unknown Interview Stage: DSA Round Location: India Year: unknown Experience: 1. Given matrix of dimension M x N, rotate the matrix by 90 degree clockwise without using any extra space. eg: input: 1 2 3 4 5 6 7 8 9 10 11 12 output: 10 7 4 1 11 8 5 2 12 9 6 3 2. Vertical order traversal of a binary tree. Question 1 can be easily solved if dimensions of the matrix is same(i.e. NxN) but was not able to find the solution for MxN dimensions. Any suggestions will be helpful.
Comments