4 ms·
And any structure is O(1), not O(n), because C structures are not parameterized.
by wnoise 4y ago
And any structure is O(1), not O(n), because C structures are not parameterized.
- jcelerier 4y agomemcpy is not O(1)
- LegionMammal978 4y agoIt's O(1) relative to any size computed at runtime: that is, running the same program (with the same array size) on different inputs will always take the same of work for a given assignment.
- jcelerier 4y agoWe're in the context of the assignment operation in the language here. Yes, in C you can only assign statically-known types but that does not mean you can just ignore that a = f(); may take a very different time depending on the types of a and f
- deleted 4y ago[deleted]