@nisargshah95: For this problem we tested in python and it was working fine. Though sometimes it happens that things don’t work quite well with python. So either please optimize your solution or please try in other language like C++ or Java.
Ya… DP was not needed… space efficient as well …
How about array element below ?? For that row = false , col= false but it is valid point.
#.# #.. #..
How does one see the east keeping the mirror 45*.
The story is not so good