Data structure and time complexity behind iOS Fundation classes like NSMutableArray

NSMutableArray

Max
1 min readApr 30, 2016

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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Max
Max

Written by Max

iOS Developer & Bluetooth LE Veteran

No responses yet

Write a response