Ensure that you are logged in and have the required permissions to access the test.
A server error has occurred. Please refresh the page or try after some time.
An error has occurred. Please refresh the page or try after some time.
4
Given a positive integer n, generate an n x n matrix filled with elements from 1 to n2 in spiral order.
Input:
First line -Read N integer
Output:
n*n matrix in required format
Explanation
N=3
Matrix=
[[1 2 3],[8 9 4],[7 6 5]]
2
[[1,2],[4,3]]
A password reset link will be sent to the following email id
?