Hello people......just wondering if i can get some help....
I need to solve the next problem: We insert a number of students "k" and a number of chairs "n".....we need to print on the screen all the possible seating arrengments.....as one space always got to exist between two students.......the formula for such arangment beeing true at least once is 'n>=2*k-1'.....Here is the catch.....NO LOOPS! NO FOR NO WHILE ANYWHERE....only RECURSION may be used....no need for malloc either....
example for n=5, k=2 (NOTE: the printing GOT to be in an increasing order):
example for n=6, k=3:
And another thing: A simple MergeSort, AGAIN with NO LOOPS!!!!!!!! RECURSION ONLY! no FOR no WHILE....FORBIDDEN or the grade will be 0! MERGESORT using only recursion is not so simple, having some trouble with it.....
Thanx a lot.........