Today I learned in depth Recursion.If you want to learn then tale this problem and try to solve it you will understand recursion.
Print the sub-sequence of arrInput a={4,2,1}
Output - {4,2,1} ,{4,2},{4,1},{2,1},{4},{2},{1},{}
To do you can refer this...