4 ms·
>, you need a O(1) memcpy I didn't downvote your comments but memcpy is O(n) instead of O(1) : https://stackoverflow.com/questions/362760/how-do-realloc-and-m
by jasode 6y ago
>, you need a O(1) memcpy
I didn't downvote your comments but memcpy is O(n) instead of O(1) : https://stackoverflow.com/questions/362760/how-do-realloc-and-memcpy-work https://stackoverflow.com/questions/362760/how-do-realloc-an...
I'll delete this reply if you meant something else.
- dragontamer 6y agoAh jeez. That's what I get for typing fast. Yeah, I mean O(1) insert / remove for linked lists, and O(n) memcpys (most array insert / remove operations) EDIT: I've edited my post above. I think its correct now. Thanks for pointing out the error.