Your code has a few key issues:

Recursion Logic: The recursion logic needs refinement. Your use of post-increment and post-decrement operators within recursive calls is causing unintended changes...