Write a function which takes a single integral value and prints out a spiral to standard output. The input value indicates the size of the grid to create the spiral in. Passing in 5 would result in a spiral generated in a 5x5 grid. The spiral should start on the top left most cell and each edge should be one unit shorter as the spiral winds around and finally ends.
This exercise is a way for you to show us how you think about and break down problems. How you use data structures and implement algorithms. The challenge shouldn't take more than a couple hours, we understand everyone's time is valuable. We are not looking for speed, we are looking for quality. We hope you enjoy the challenge.
- Any language can be used.
- Code should run without errors.