If we want the memory consumption of an iterative approach and the elegance of a recursive implementation, then we would need to take a look at : Tail recursion! So, let’s start decoding this.
About the very basics of recursive function and stack overflow.
About how to implement two popular graph traversal algorithms. Further, understand difference between stack data structure and program stack used with recursion.