Rotate array 90* anticlockwise

In this question number of columns is not fixed and also even no of colomns for each row is not given in input .So how to get iinput of such array.

It is given in the Question that the matrix will be of N x N size. So whatever is the number of rows, same will be the number of columns. Input will have N only. Make a NxN 2D array and take inputs. Get it?