upload algo II. Asg 3

Applied Space optimisation. Only use 2 rows for it, since the current
S(n) only cares about the S(n-1)

space complexity is O(W)
time complexity is O(WN)