1 , 1
1 , 2
2 , 1
1 , 3
3 , 1
2 , 2
1 , 4
4 , 1
2 , 3
3 , 2
_ , _
_ , _
_ , _
_ , _
_ , _
1 , 5
5 , 1
2 , 4
4 , 2
3 , 3
5 , 1
2 , 4
4 , 2
3 , 3
Here is logic...
Starting for 2, 3, 4... n
Give all combinations of x,y so that x + y is n
Pair with minimum number comes first..
If two pairs have same minimum x as minimum comes first..
No comments:
Post a Comment