Example : 1)m = 3,n = 2 a11 a12 a21 a22a31 a32Output : a11 a21 a12 a31 a22 a322) m = 3, n = 4a11 a12 a13 a14a21 a22 a23 a24a31 a32 a33 a34Output : a11 a21 a12 a31 a22 a13 a32 a23 a14 a33 a24 a34
Latest Answer : My answer is similiar to Ashish.Shekhar 's.#include #include using namespace std;int main(int argc, char *argv[]){ int m, n; cout
u are given a n*n square matrix where each element is either 0 or 1....u have to find the square submatrix with the largest length such that all the elements along the border of that square submatrix matrix
Latest Answer : You can find de length of the side of square by using your procedure. but how can you find the position? ...
You are given a matrix. The matrix elements are such that they are sorted both horizontally and vertically. Given an element of the matrix, your job is to obtain its position in an efficient manner.Example:
Latest Answer : 10 20 30 15 35 98 48 76 110Input: 76Output: 3rd row, 2nd column.First start from extreme right-top and keep on seraching until you reach extreme left-down. n=0; m=0; while(n