Is there Queue Data Structure in Objective-C just like C# or Java? If not, what data structure should I use to do Enqueue and Dequeue? Thanks.
Asked
Active
Viewed 2,068 times
0
-
Use [NSMutableArray](http://stackoverflow.com/a/936497/1031955). – Thanakron Tandavas Mar 24 '13 at 09:26
1 Answers
1
If there are not too many elements in the queue an NSMutableArray is suitable. When the overhead of shifting elements really becomes a problem, you should consider using Objective-C++ and a std::dequeue.
Nikolai Ruhe
- 81,520
- 17
- 180
- 200