NewThe Learning module is now liveSee what's new

(This question is a variation of the LeetCode question 867. Transpose Matrix. If you haven't completed that question yet, it is recommended to solve it first.)

Given a 2D integer array matrix, return the transpose of matrix. The transpose of a matrix is the matrix flipped over its main diagonal, switching the matrix's row and column indices.

You are given a square integer matrix of size n × n and a positive integer numThreads. You must using up to numThreads worker threads in parallel, return the transpose of matrix.

Test Cases
Input
Output
Expected