Given an array of n positive integers that represent lengths. Find out the maximum possible area whose four sides are picked from given array. Note that a rectangle ...

Share

We have one 2D array, filled with zeros and ones. We have to find the starting point and ending point of all rectangles filled with 0. It is given that rectangles are...

Share

There is a given binary matrix, we need to find if there exists any rectangle or square in the given matrix whose all four corners are equal to 1.
Examples:
Input :
m...

Share

Write a code which inputs two numbers m and n and creates a matrix of size m x n (m rows and n columns) in which every elements is either X or 0. The Xs and 0s must ...

Share

Given a matrix with 0 and 1’s, find the largest rectangle of all 1’s in the matrix. The rectangle can be formed by swapping any pair of columns of give...

Share

Given a binary matrix, find the maximum size rectangle binary-sub-matrix with all 1’s.
Example:
Input : 0 1 1 0
1 1 1 1
1 1 1 1
...

Share

Given a 2D array, find the maximum sum subarray in it. For example, in the following 2D array, the maximum sum subarray is highlighted with blue rectangle and sum of...

Share