I am wondering what tricks the competitive programming community uses to avoid stack overflow with recursive algorithms. I vaguely remember pulling up someone's code a while back that used a recursive DFS with input size at least 100,000. I also have Steven and Felix Halim's Competitive Programming book and they seem to use recursion without regard to the possibility of stack overflow.