👍2🤩1
Wipro milestone 1 2 & 3
All solutions available
Mcq and coding..👨💻
Dm fast @ILOVEU_143✅
Share @coding_000❤️
All solutions available
Mcq and coding..👨💻
Dm fast @ILOVEU_143✅
Share @coding_000❤️
👍2
👍1😎1
Geeksforgeeks
Programming Logic Section
5/5 Answers
Programming Logic Section
5/5 Answers
👍3
Geeksforgeeks
Quantitive Section
5/5 Answers✅
Quantitive Section
5/5 Answers✅
👍1
Geeksforgeeks
Logical Section
5/5 Answers✅
Logical Section
5/5 Answers✅
👍1
public int maxGoodLength(int matrix[][]){
int N = matrix.length;
int M = matrix[0].length;
int maxGoodLength = 0;
for (int L = Math.min(N, M); L > 0; L--) {
outerLoop:
for (int i = 0; i <= N - L; i++) {
for (int j = 0; j <= M - L; j++) {
boolean allGreater = true;
for (int x = i; x < i + L; x++) {
for (int y = j; y < j + L; y++) {
if (matrix[x][y] < L) {
allGreater = false;
break;
}
}
if (!allGreater) {
break;
}
}
if (allGreater) {
maxGoodLength = L;
break outerLoop;
}
}
}
if (maxGoodLength > 0) {
break;
}
}
return maxGoodLength;
}
@Coding_000✅
int N = matrix.length;
int M = matrix[0].length;
int maxGoodLength = 0;
for (int L = Math.min(N, M); L > 0; L--) {
outerLoop:
for (int i = 0; i <= N - L; i++) {
for (int j = 0; j <= M - L; j++) {
boolean allGreater = true;
for (int x = i; x < i + L; x++) {
for (int y = j; y < j + L; y++) {
if (matrix[x][y] < L) {
allGreater = false;
break;
}
}
if (!allGreater) {
break;
}
}
if (allGreater) {
maxGoodLength = L;
break outerLoop;
}
}
}
if (maxGoodLength > 0) {
break;
}
}
return maxGoodLength;
}
@Coding_000✅
🔥2❤1👍1