Problem is description


let’s say possible shapes in the matrix are :

  1. XX         2. XX      3. XX
     X             X

Then if we calculate the number of shapes there are 2 different shapes only (as 1 & 2 are the same).
but it is accepting the answer 3.
Hence the problem should simply find total number of Iceland or something like that.


Yes the problem requires to print number of all regions in which ‘X’ is present. I was also stuck up on this problem because of this issue.