3 ms·
Recursive division may be elegant, but it seems that may also have its disadvantages.
by davidim 8y ago
Recursive division may be elegant, but it seems that may also have its disadvantages.
- wakamoleguy 8y agoOne trick you could use is to add a setTimeout or asnyc/await somewhere during the recursion. By forcing a step to be asynchronous, the stack count will be reset.