private int searchLeft(char[][] image, int y) {
        int low = 0, high = y;
        while (low <= high) {
            int mid = low + (high - low) / 2;
            int i = 0;
            while (i < image.length && image[i][mid] == '0') ++i;
            if (i < image.length) high = mid - 1;
            else low = mid + 1;
        }
        return low;
    }