Row Wise Traversal Send Feedback Given a matrix, ‘A’ of size ‘N’ * ‘M’, you must traverse the matrix row-wise. You must return an integer array of size ‘N’ * ‘M’ denoting the row-wise traversal of the matrix. For example: Input : A = [ [1, 2, 3], [4, 5, 6] ] Output : 1 2 3 4 5 6 Explanation: For the given matrix, the first row is [1, 2, 3], and the second is [4, 5, 6]. For row-wise traversal, you must traverse the first row and then the second. Input Format: First-line contains 'T,' denoting the number of Test cases. For each Test case: The first line contains two integers, ‘N' and ‘M’. The following ‘N’ lines have ‘M’ integers each, denoting the matrix ‘A’. Output Format:- You must return the array with elements in order of row-wise traversal. Note:- You don’t need to print anything. Just implement the given function. Constraints : 1 <= T <= 10 1 <= N * M <= 10^5 1 <= A[ i ][ j ] <= 10^9 Time Limit: 1 sec Sample Input 1 : 2 2 2 4 3 2 1 1 5 1 2 3 4 ...
Code Genius is an all-in-one platform for bloggers, YouTubers, job seekers, and tech enthusiasts. It offers resources on content creation, job search, cooling pads, latest tech info, smartphones, headphones, laptops, electronics, and online earning.