+ 1
what type of queue should i use?
i have to solve a problem where i need a dynamic queue because is changing on every iteration. I m making a linkedlist and using it as queue. is it a correct approach also would it be fast as i m using dynamic memory will it affect time? also are there any built in data structure which i could use (using some std library files)?
1 Réponse
+ 6
I'd tell you to continue building your own linked list / queue structure, because it's a really good practice to train your skills and understanding at the topic.
That said, there are a few libraries that you might find useful, either to deploy in your program, or just as a reference.
http://en.cppreference.com/w/cpp/container/queue
http://en.cppreference.com/w/cpp/container/vector