cocoa-sorted-dictionary


A sorted dictionary class for Objective-C and Cocoa on OS/X and iPhone

The SortedDictionary group of classes re-implement NSDictionary using a data structure that keeps entries sorted at all times, while maintaining efficient access. SortedDictionary lets you enumerate entries according to their forward or reverse key order efficiently and without having to sort them first.

Enumeration of an entire sorted dictionary occurs at O(n) time. Get/Set/Add/Delete operations all complete at O(log n) time. Internally, a self balancing binary tree is used to hold key-value pairs and maintain the performance characteristics.

Project Information

Labels:
SortedDictionary cocoa ObjectiveC