{"id":18832820,"url":"https://github.com/brandymint/test","last_synced_at":"2026-01-25T20:30:18.279Z","repository":{"id":5589249,"uuid":"6795618","full_name":"BrandyMint/test","owner":"BrandyMint","description":"Coder test","archived":false,"fork":false,"pushed_at":"2012-12-16T08:15:36.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-12-30T07:23:30.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cloverstudio/Spika-Server","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrandyMint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-21T12:59:29.000Z","updated_at":"2015-03-04T09:12:17.000Z","dependencies_parsed_at":"2022-09-22T03:01:34.245Z","dependency_job_id":null,"html_url":"https://github.com/BrandyMint/test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Ftest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Ftest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Ftest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Ftest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrandyMint","download_url":"https://codeload.github.com/BrandyMint/test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239768926,"owners_count":19693763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T01:59:05.622Z","updated_at":"2026-01-25T20:30:18.212Z","avatar_url":"https://github.com/BrandyMint.png","language":"Ruby","readme":"# The issue\n\n\u003e Write a program in Ruby that takes one command line argument (referred to going forward as n).\n\u003e If n is not a perfect square print an appropriate error message and exit. If n is a perfect\n\u003e square then create a sequence from 1 to  n and build a matrix from the sequence by walking\n\u003e in counter-clockwise spiral order. Examples below illustrate this for n=1,4,9,16 but your\n\u003e solution should work for any n that is a perfect square. Once you have built the matrix print\n\u003e it, ensuring even column widths as in examples below and then exit.\n\u003e\n\u003e       Input:  1\n\u003e       Output: 1\n\u003e\n\u003e       Input:  4\n\u003e       Output: 4 3\n\u003e               1 2\n\u003e\n\u003e       Input:  9\n\u003e       Output: 5 4 3\n\u003e               6 1 2\n\u003e               7 8 9\n\u003e\n\u003e       Input:  16\n\u003e       Output: 16 15 14 13\n\u003e               5  4  3  12\n\u003e               6  1  2  11\n\u003e               7  8  9  10\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandymint%2Ftest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandymint%2Ftest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandymint%2Ftest/lists"}