This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import random | |
import time | |
''' | |
Function to flatten an arbitrarily nested array (actually, a list) of ints. | |
You might be wondering why we wouldn't just use an in-built function to do this. | |
Well, we could (should?) do that, but sometimes we are gluttons for punishment | |
and wish to avoid the temptations of Google. |