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

https://github.com/kessiler/squarespiral

Solution of the square spiral at various levels of complexity
https://github.com/kessiler/squarespiral

Last synced: 3 months ago
JSON representation

Solution of the square spiral at various levels of complexity

Awesome Lists containing this project

README

        

Square Spiral
============

Given the following square spiral below, write a program that displays the coordinates (x, y) of a given point provided for an input n. Implement two distinct algorithms that run in the worst case:
- O(1)
- O(n)

![ScreenShot](https://raw.github.com/kessiler/squareSpiral/master/squareExample.png)