I am trying to learn C++ and I having some difficulty with this task. I need to take this code and convert it from a liked queue to a circular linked queue. Any help would be greatly appreciated.
I haven't done a circular link list but I think that the assignment myBack->next = myFront; should do the trick. I think it needs to appear in 2 places in your enqueue().
It looks like this could also be done by passing myFront as the 2nd argument to the Node constructor (but only if the list isn't empty).
- conceptually, how may a linear linked list differ from a circular linked list
- in particular, think about how heads and tails may be dealt with, in both cases
- then look through each line of your code, keeping in mind the notes you collected from above