From dbd9448e99db9b1e3440c6f579e3e53333bde4f0 Mon Sep 17 00:00:00 2001 From: anujgaud <146576725+anujgaud@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:14:57 +0530 Subject: [PATCH] Update method names --- .../matrixtozero/SetMatrixToZeroUnitTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core-java-modules/core-java-arrays-operations-advanced-2/src/test/java/com/baeldung/matrixtozero/SetMatrixToZeroUnitTest.java b/core-java-modules/core-java-arrays-operations-advanced-2/src/test/java/com/baeldung/matrixtozero/SetMatrixToZeroUnitTest.java index ba8d53a11f..ee4996457e 100644 --- a/core-java-modules/core-java-arrays-operations-advanced-2/src/test/java/com/baeldung/matrixtozero/SetMatrixToZeroUnitTest.java +++ b/core-java-modules/core-java-arrays-operations-advanced-2/src/test/java/com/baeldung/matrixtozero/SetMatrixToZeroUnitTest.java @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test; public class SetMatrixToZeroUnitTest{ @Test - void givenMatrix_whenUsingBruteForce_thenSetZeroes() { + void givenMatrix_whenUsingSetZeroesByNaiveApproach_thenSetZeroes() { int[][] matrix = { {1, 2, 3}, {4, 0, 6}, @@ -16,12 +16,12 @@ public class SetMatrixToZeroUnitTest{ {0, 0, 0}, {7, 0, 9} }; - SetMatrixToZero.setZeroesBruteForce(matrix); + SetMatrixToZero.setZeroesByNaiveApproach(matrix); assertArrayEquals(expected, matrix); } @Test - void givenMatrix_whenUsingExtraSpace_thenSetZeroes() { + void givenMatrix_whenUsingSetZeroesByTimeOptimizedApproach_thenSetZeroes() { int[][] matrix = { {1, 2, 3}, {4, 0, 6}, @@ -32,12 +32,12 @@ public class SetMatrixToZeroUnitTest{ {0, 0, 0}, {7, 0, 9} }; - SetMatrixToZero.setZeroesExtraSpace(matrix); + SetMatrixToZero.setZeroesByTimeOptimizedApproach(matrix); assertArrayEquals(expected, matrix); } @Test - void givenMatrix_whenUsingOptimized_thenSetZeroes() { + void givenMatrix_whenUsingSetZeroesByOptimalApproach_thenSetZeroes() { int[][] matrix = { {1, 2, 3}, {4, 0, 6}, @@ -48,7 +48,7 @@ public class SetMatrixToZeroUnitTest{ {0, 0, 0}, {7, 0, 9} }; - SetMatrixToZero.setZeroesOptimized(matrix); + SetMatrixToZero.setZeroesByOptimalApproach(matrix); assertArrayEquals(expected, matrix); } }