re-entrant recursively implementation
Merge pull request #136 from mocheng/mocheng_solution

re-entrant recursively implementation in JavaScript