Fast algorithm using double recursion.
Merge remote-tracking branch 'origin/master'