Sunday 15 March 2015

Thoughtworks :StairProblem

This is Screening interview Question asked in Thoughtworks.


Question: Print spiral stair case pattern.

Input: Y is the number of stairs available, X  is the length spiral visible stairs.
Output: Pattern in spiral form.



Stair Problem ...Enter X,Y(Y is number of stair and Y length of stair)
15 4
1
_2
__3
___4
__5
_6
7
8
_9
__10
___11
__12
_13
14
15