Write a function, minimum_island, that takes in a grid containing Ws and Ls. W represents water and L represents land. The function should return the size of the smallest island. An island is a vertically or horizontally connected region of land.
You may assume that the grid contains at least one island.
grid = [['W', 'L', 'W', 'W', 'W'],['W', 'L', 'W', 'W', 'W'],['W', 'W', 'W', 'L', 'W'],['W', 'W', 'L', 'L', 'W'],['L', 'W', 'W', 'L', 'L'],['L', 'L', 'W', 'W', 'W'],]minimum_island(grid) # -> 2
grid = [['L', 'W', 'W', 'L', 'W'],['L', 'W', 'W', 'L', 'L'],['W', 'L', 'W', 'L', 'W'],['W', 'W', 'W', 'W', 'W'],['W', 'W', 'L', 'L', 'L'],]minimum_island(grid) # -> 1
grid = [['L', 'L', 'L'],['L', 'L', 'L'],['L', 'L', 'L'],]minimum_island(grid) # -> 9
grid = [['W', 'W'],['L', 'L'],['W', 'W'],['W', 'L']]minimum_island(grid) # -> 1