2 ms·
And inserting N elements into slice would be?..
by SergeAx 5y ago
And inserting N elements into slice would be?..
- badrequest 5y agothe slice already exists in this context, that cost is already incurred.
- skj 5y ago"this context" is using a map from the beginning and not having that slice.
- hamburglar 5y ago“This context” is also not known except one specific way in which the data is accessed, so blithely saying “I’d use a map instead” and being sure that’s the right answer in all cases is pretty uninformed. It helps to assume the person who chose a slice did it for some actual reason and not because they are an idiot.