Recent SDE OAs asked for Chalo Mobility, November, 2022 | The Playground

Chalo · Question · Posted Nov 2022

Question The Playground You are playing in a playground in form of a 2D matrix of size N x M. Initially, the playground contains just an outer boundary. There are some walls given in an array A of size Q. You construct these walls in the playground. Task Determine how many different regions the playground gets divided into. Notes The walls will be given as input ×1, y1, ×2, y2. where (x1, y1) and (×2, 2) are adjacent cells of ...

The full answer & interview discussion are available to premium members.

Log in Create a free account