C++ Daily Algorithm Programming | Middle School Geometry & Olympiad Competition Programming | Diagonal Traversal Algorithm Programming
The programming task is to implement a function that takes a matrix of size m x n, and returns all elements of the matrix in diagonal traversal order as an array. Input example: mat = [[1,2,3],[4,5,6],[7,8,9]]Output example: [1,2,4,7,5,3,6,8,9]Example 2:Input example: mat = [[1,2],[3,4]]Output example: [1,2,3,4]Start solving the problem Thoughts and Algorithm The sum of the … Read more