2D Array in Swift Posted on November 1, 2023November 23, 2023 By Sid No Comments on 2D Array in Swift 2D array in Swift examples Q.1 Given a matrix find row-wise sum. Sol> var matrix = [ [1, -1, 4, 3], [2, 6, -1, -2], [6, -1, 0, 3] ] func rowWiseSum(matrix: [[Int]]) { for row in 0..<matrix.count { var sum = 0 for col… Read More “2D Array in Swift” » Blog