Data structure and time complexity behind iOS Fundation classes like NSMutableArray

NSMutableArray

NSMutableArray probably uses circular buffer (ref 1).

From Apple guide (ref 2) — Note: Most operations on an array take constant time: accessing an element, adding or removing an element at either end, and replacing an element. Inserting an element into the middle of an array takes linear time.

References:

to be continued

A single golf clap? Or a long standing ovation?

By clapping more or less, you can signal to us which stories really stand out.