Check out the requirement at the bottom of the page. Sounds easy enough eh?
One problem. Since they do not allow you to use malloc, new or a simple STL queue and yet want you to destroy the memory - how do you do this?
The memory they are showing is created on the stack. Therefore calling destroy on the queue will do....um....nothing. You can't destroy it. Only thing you can do is flag the queue as being invalid and unusable.
Comments? The problem itself is quite easy. But I'm not understanding the destroyQ() function. Doesn't make sense.
The C++ version they are asking for is so simple. Just use the STL.
EDIT:Ahhh...destroyQ() is simply destroying the pointer.
Why not do a contest that could land you a job eh?