views:

410

answers:

3

What are the data structures that we can use in objective c?

+3  A: 

Objective-C is C, so it supports struct and the familiar C-language data types like int and char.

In addition there are special Objective-C classes.

You might want to take a look at Apple's Objective-C book.

Seth
+2  A: 

The following documents may help:

Steve Harrison
+3  A: 

NSArray is your standard array structure.

NSDictionary is a key-value "hash map"

NSSet is an unordered collection of unique objects.

Each of these is immutable (ie, once you create them, you can't change them). If you need to modify them dynamically, then you'll use their mutable subclasses: NSMutableArray, NSMutableSet, etc.

For structures beyond this, check out the CHDataStructures framework, which has queues, stacks, trees, treaps, and a whole lot more: http://cocoaheads.byu.edu/code/chdatastructures

Dave DeLong