3 ms·
Is this only appropriate for the case where we want to iterate over all the elements? Don't we lose the O(1) access using a name? I'm assuming you're making 2 a
by nhatbui 11y ago
Is this only appropriate for the case where we want to iterate over all the elements? Don't we lose the O(1) access using a name? I'm assuming you're making 2 arrays.
- makecheck 11y agoYes. My point is to consider what is actually required before making complex structures. It is often perfectly acceptable to combine two existing types and handle what few interactions they actually have.