Project Euler #44: A Recursive Golang Solution - Part Two
_________________________ I n Part One , I described Project Euler #44 and an overall way to solve it. Here in Part Two, I will describe a recursive Golang solution for this problem. See that solution at GitHub . In an earlier article , I wrote a detailed explanation of recursion in a SQL Server 2005+ context. We can think of software that calls itself in a controlled way as recursive . Recursion involves a lot more than that, of course, but this description will work for now. A software system that repeatedly calls itself until a defined "base case" occurs means that we can substitute recursive code for a loop, because in a conventional loop, the code repeats a finite number of times. In Part One , we saw that a conventional Project Euler #44 solution would probably have two nested for-loops. Therefore, I figured that maybe I could nest two recursive structures, one to primarily handle P 0 and one to primarily handle P 1 . As we'll see, this wo...