MCPcopy Create free account
hub / github.com/careercup/ctci / nullifyRow

Method nullifyRow

java/Chapter 1/Question1_7/Question.java:6–10  ·  view source on GitHub ↗
(int[][] matrix, int row)

Source from the content-addressed store, hash-verified

4
5public class Question {
6 public static void nullifyRow(int[][] matrix, int row) {
7 for (int j = 0; j < matrix[0].length; j++) {
8 matrix[row][j] = 0;
9 }
10 }
11
12 public static void nullifyColumn(int[][] matrix, int col) {
13 for (int i = 0; i < matrix.length; i++) {

Callers 2

setZeros2Method · 0.95
setZerosMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected