0

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.

rockXrock
  • 3,403
  • 1
  • 25
  • 18

1 Answers1

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