Is there any built in sort function in Objective C with complexity of O(n log n)?
2
-
4These should be a start: stackoverflow.com/questions/805547/… , stackoverflow.com/questions/1351182/… , stackoverflow.com/questions/1844031/… , stackoverflow.com/questions/1132806/… (I did a quick search for "objective-c sort nsarray")user166390– user1663902012-01-16 04:21:12 +00:00Commented Jan 16, 2012 at 4:21
-
1an interesting article about array in the apple world and how they behave. ridiculousfish.com/blog/posts/array.htmlvikingosegundo– vikingosegundo2012-01-16 04:52:08 +00:00Commented Jan 16, 2012 at 4:52
Add a comment
|
2 Answers
Apple doesn't provide any kind of information about the complexity on his sorting functions,
You should asume that the sorting algorithm will be chosen by the framework to give the best performance, in any case you can take a look at CHDataStructures if you need extra data structures to implement the sorting algorithm on your own, probably a heap or a binary tree sort.