MCPcopy Create free account
hub / github.com/Ayush7614/Daily-Coding-DS-ALGO-Practice / main

Method main

Leetcode/Java/SetZeroes.java:7–16  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

5// this code will set all elements in the respective rows and columns in matrix to zero, in which a zero is located in matrix.
6public class SetZeroes {
7 public static void main(String[] args) {
8 int[][] mat = {
9 {1, 3, 5},
10 {2, 0, 8},
11 {4, 4, 6}
12 };
13
14 setZeroes(mat);
15 print2D(mat);
16 }
17
18 static void setZeroes(int[][] matrix) {
19 boolean firstrow = false;

Callers

nothing calls this directly

Calls 2

setZeroesMethod · 0.95
print2DMethod · 0.95

Tested by

no test coverage detected