If You needed time complexity then it is certainly not O(N!)
as many suggest but way less then that it is O(2^N)
.
Proof:-
T(N) = T(N-1) + T(N-2) + T(N-3) + T(N-4)........T(1)
moreover by above formula
T(N-1) = T(N-2) + T(N-3)...... T(1)
hence T(N) = T(N-1) + T(N-1) = 2*T(N-1)
solving above gives T(N) = O(2^N)
Whereas if you needed space complexity then for recursive function space complexity is calculated by the amount of stack space at max occupied by it at a moment and that in this case cannot exceed of O(N)
But in any case the answer is not O(N!)
because that many computations are not done at all so how can stack occupy that much space.
Note:- Try to run the function for n = 20
if it doesnt cause memory overflow then answer given in text will be 20! which is larger than any memory but i think it will run in O(2^20)
time without any stack overflow.