Skip to content

[FEATURE REQUEST]<Spiral Matrix II> #4429

@kirti1211c

Description

@kirti1211c

What would you like to Propose?

We can add the Spiral Matrix II in other section.
Problem Statement - Given a positive integer n, generate an n x n matrix filled with elements from 1 to n^2 in spiral order.
Example:
Input: n=3
Output: [[1,2,3],[8,9,4],[7,6,5]]
Explanation:
image

Issue details

The algorithm will fill the matrix in spiral order and store the answer in an array of array and hence, return the same array.

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions