diff --git a/problems/swift/transpose-matrix.swift b/problems/swift/transpose-matrix.swift new file mode 100644 index 0000000..750c82e --- /dev/null +++ b/problems/swift/transpose-matrix.swift @@ -0,0 +1,16 @@ +class Solution { + func transpose(_ matrix: [[Int]]) -> [[Int]] { + var m = Array( + repeating: Array(repeating: 0, count: matrix.count), + count: matrix[0].count + ) + + for y in 0..