Swiggy Online Assesment Question
Anonymous User
1743

There is a grid with balloons at some indices. Players can shoot arrows from outside the grid horizontally and vertically. Every arrow shot will burst all balloons in that row if fired horizontally and in that column if fired vertically.
Given the balloons positions in the grid find the minimum no of arrows required to burst all the balloons.
1 <= N(No of ballons)<= 50
0 <= x, y -> Positions of the balloons <10^9-1

Comments (6)