3 ms·
Which could be ok depending on memory constraints
by sethammons 8y ago
Which could be ok depending on memory constraints
- thaumasiotes 8y agoWell, it's ok based on this statement of the problem. It's never going to make sense as an approach in reality, because the work you need to do constructing the second data structure is considerably more than the work you'd need to do to make the extra half pass through the linked list. You're losing on space and time by doing it this way.