Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Hello Akash Kumar, one approach to this Kata, is being able to take a 2D grid of 0's an 1's and be able to store the connected shapes. Recursion can be an option for pattern searching. Additionally you can look into the breadth first search algorithm. Happy coding!
Your 1) is a great idea... my solution would have been a lot shorter had I thought of that. I waited until a ship was "closed off" before checking all around it.
This comment is hidden because it contains spoiler information about the solution
What have you thought of so far?
lstrip and rstrip might help