Glossary: Coding Interviews in JavaScript
Exponential time
Also written: O(2ⁿ)
Running time of O(2ⁿ), where the work doubles with every extra item. It is fine for about 20 items (a million steps) but far too slow for 50.
Glossary: Coding Interviews in JavaScript
Also written: O(2ⁿ)
Running time of O(2ⁿ), where the work doubles with every extra item. It is fine for about 20 items (a million steps) but far too slow for 50.