3 ms·
O(1) access to the nth item turns out to be more important than O(1) insertion.
by QuadmasterXLII 3y ago
O(1) access to the nth item turns out to be more important than O(1) insertion.
- taeric 3y agoYou'd be surprised how many exponential loops are in successfully run stacks. :) But yes, when it matters, it matters. Luckily, it isn't hard to use appropriate data structures. Also luckily, a surprising amount of code will linearly process data.