Given a choice, would you choose an iterative approach or a recursive one?View other answers to this thread
Learn Something New Everyday,
Connect With The Best Developers!
To add more about
Avoid heap memory allocation
It also helps to know your language/compiler: if it supports tail call optimization, then you can do recursive call and avoid the memory footprint you would usually get from many recursive calls