"Compute enclosed regions" solution description doesn't match the actual code

#1

The text description doesn’t match the code:

  • the text describes outside-in approach where we enqueue all 'W’s at the border and explore inner 'W’s that are reachable from the border using BFS
  • the actual code is inside-out approach where for each ‘W’ we try to find a path to the border, marking all elements of unsuccessful path as 'B’s

In my opinion, the outside-in approach is easier to code.

0 Likes

#2

Hey damluar,

Thanks for your comment, and we have updated the code according to this change. Please keep providing us your comment and suggestion!

0 Likes