Actieve werkgever
implement a queue from stack
Anoniem
Agreed - an implementation class Queue { private: stack q; stack s; public: push(int x) { s.push(); }; int pop() { if(q.empty()) { while(x = s.pop()) q.push(); }; return q.pop(); }; };
using two stacks. one as head of the queue, the other as the tail of the queue
Volg de bedrijven van je dromen om als eerste op de hoogte te zijn van vacatures en te profiteren van tips van insiders.
Zoek naar vacatures om gepersonaliseerde vacature-aanbevelingen en -updates te krijgen.