Update method names

This commit is contained in:
anujgaud 2024-04-02 22:14:45 +05:30 committed by GitHub
parent cd5a95f764
commit e73a578dbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ package com.baeldung.matrixtozero;
import java.util.*;
public class SetMatrixToZero{
static void setZeroesBruteForce(int[][] matrix) {
static void setZeroesByNaiveApproach(int[][] matrix) {
int row = matrix.length;
int col = matrix[0].length;
int [][] result = new int[row][col];
@ -34,7 +34,7 @@ public class SetMatrixToZero{
}
}
static void setZeroesExtraSpace(int[][] matrix) {
static void setZeroesByTimeOptimizedApproach(int[][] matrix) {
int rows = matrix.length;
int cols = matrix[0].length;
@ -63,7 +63,7 @@ public class SetMatrixToZero{
}
}
static void setZeroesOptimized(int[][] matrix){
static void setZeroesByOptimalApproach(int[][] matrix){
int rows = matrix.length;
int cols = matrix[0].length;