Count Enclosed Islands in a Grid | Oracle Interview Question