Computer Science, asked by subhajitdas1742001, 1 year ago

What would be the next cell in a 5*5 matrix that should be displayed after (1,5) for spiral traversing animation?

Answers

Answered by ankurbadani84
0

Answer :-

A spiral matrix is nxn square matrix formed by placing the numbers 1, 2,3..n².

In this example, N = 5

The spiral matrix for 5 * 5 is as below. If we see numbers are arranged in the form of spiral.

--------->

1     2    3    4    5    

16  17  18   19   6    

15  24  25  20  7

14  23  22   21   8

13  12   11     10  9

So we look '16 17 18 19 6 ' will be displayed in next after (1,5).

Similar questions