You could implement recursive algorithms in ways that avoid risking stack overflow, i.e. by manually implementing a stack of variables or a stack of states.
It is better to implement combinators that take pieces of recursive definitions and do this work for you. It is particularly easy to do in C#, with its anonymous delegates.
The program below shows how to implement higher order functions that flatten recursion into iterative code that doesn't eat up the stack. Its output would be
remove the 2's from 24 and you get 3
7! = 4030
Unmirrored: <<<0>1<2>>4<5<7>>>
Mirrored: <<<7>5>4<<2>1<0>>>
The program below is written in C# 3.0.