An open API service indexing awesome lists of open source software.

https://github.com/mekaem/gospiral

A spiral matrix implementation in Go (interview question)
https://github.com/mekaem/gospiral

Last synced: about 1 year ago
JSON representation

A spiral matrix implementation in Go (interview question)

Awesome Lists containing this project

README

          

# gospiral

A spiral matrix implementation in Go (interview question)

## Prompt

Write a function that generates a square matrix of size n x n filled with '#' characters in a spiral pattern, starting from the top-left corner and moving clockwise. The remaining spaces should be filled with spaces (' '). Then, create a program that prints these spiral patterns for n ranging from 1 to 7.