Skip to main content

Timeline for Implementing a generic Queue in C

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Sep 13, 2016 at 19:31 answer added chux timeline score: 4
Sep 13, 2016 at 18:45 comment added Luis Averhoff @fernando.reyes oops yes your right that in the dequeue function function I'm already making making head and tail equal to null if there is one element in the queue.
Sep 13, 2016 at 18:43 comment added fernando.reyes @LuisAverhoff Your dequeue will even make head and tail null, that is already taken care off. And will avoid duplicated code for when you need to make a change in logic on your code
Sep 13, 2016 at 18:37 comment added Luis Averhoff @fernando.reyes So then do something like this int val while(q->sizeOfQueue > 0){dequeue(q, &val)} q->head = q->tail = NULL;This of course would be in the clearQueue function.
Sep 13, 2016 at 18:26 comment added fernando.reyes Why not use dequeue on clearQueue until empty?
Sep 13, 2016 at 17:35 history edited Jamal CC BY-SA 3.0
added 4 characters in body; edited title
Sep 13, 2016 at 17:11 answer added Yk Cheese timeline score: 3
Sep 13, 2016 at 16:49 comment added 200_success I have rolled back Rev 2 → 1, as it just adds confusion to have a second version of the code in the question for no good reason. You can either make this a proper comparative-review question (only if you can do so without making any existing answers look silly) or post a follow-up question.
Sep 13, 2016 at 16:45 history rollback 200_success
Rollback to Revision 1
Sep 13, 2016 at 16:31 history edited Luis Averhoff CC BY-SA 3.0
added 935 characters in body
Sep 13, 2016 at 15:10 answer added coderodde timeline score: 2
Sep 13, 2016 at 14:50 history asked Luis Averhoff CC BY-SA 3.0