We'd usually solve this problem recursively, but the proposed solution uses an iterative algorithm.
Vi ville normalt løse dette problem rekursivt, men den foreslåede løsning bruger en iterativ algoritme.