Binary right angle triangle consists of only 0's and 1's in alternate positions. Examples :
Input : 4 Output : 0 1 0 0 1 0 1 0 1 0 Input : 3 Output : 0 1 0 0 1 0
0 1 0 0 1 0 1 0 1 0
Time complexity: O(n*n)
Auxiliary space: O(1)