Skip to content

Commit

Permalink
spiral-matrix: sync (#121)
Browse files Browse the repository at this point in the history
* Sync the `spiral-matrix` exercise's docs with the latest data.

* Sync the `spiral-matrix` exercise's metadata with the latest data.
  • Loading branch information
ErikSchierboom authored May 22, 2024
1 parent b8a312b commit 9cb2053
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 2 additions & 4 deletions exercises/practice/spiral-matrix/.docs/instructions.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Instructions

Given the size, return a square matrix of numbers in spiral order.
Your task is to return a square matrix of a given size.

The matrix should be filled with natural numbers, starting from 1
in the top-left corner, increasing in an inward, clockwise spiral order,
like these examples:
The matrix should be filled with natural numbers, starting from 1 in the top-left corner, increasing in an inward, clockwise spiral order, like these examples:

## Examples

Expand Down
11 changes: 11 additions & 0 deletions exercises/practice/spiral-matrix/.docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Introduction

In a small village near an ancient forest, there was a legend of a hidden treasure buried deep within the woods.
Despite numerous attempts, no one had ever succeeded in finding it.
This was about to change, however, thanks to a young explorer named Elara.
She had discovered an old document containing instructions on how to locate the treasure.
Using these instructions, Elara was able to draw a map that revealed the path to the treasure.

To her surprise, the path followed a peculiar clockwise spiral.
It was no wonder no one had been able to find the treasure before!
With the map in hand, Elara embarks on her journey to uncover the hidden treasure.
4 changes: 2 additions & 2 deletions exercises/practice/spiral-matrix/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
".meta/examples/spiralMatrix.example.u"
]
},
"blurb": " Given the size, return a square matrix of numbers in spiral order.",
"blurb": "Given the size, return a square matrix of numbers in spiral order.",
"source": "Reddit r/dailyprogrammer challenge #320 [Easy] Spiral Ascension.",
"source_url": "https://www.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/"
"source_url": "https://web.archive.org/web/20230607064729/https://old.reddit.com/r/dailyprogrammer/comments/6i60lr/20170619_challenge_320_easy_spiral_ascension/"
}

0 comments on commit 9cb2053

Please sign in to comment.