Recursion solution added.