Aktiver Arbeitgeber
implement a queue from stack
Anonym
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
Verschaffe dir einen Vorsprung bei Chancen und Insider-Tipps, indem du deinem Traumunternehmen folgst.
Erhalte personalisierte Jobempfehlungen und Updates, indem du Suchanfragen startest.