classMyQueue { private: // store elements vector<int> data; // a pointer to indicate the start position int p_start; public: MyQueue() {p_start = 0;} /** Insert an element into the queue. Return true if the operation is successful. */ boolenQueue(int x){ data.push_back(x); returntrue; } /** Delete an element from the queue. Return true if the operation is successful. */ booldeQueue(){ if (isEmpty()) { returnfalse; } p_start++; returntrue; }; /** Get the front item from the queue. */ intFront(){ return data[p_start]; }; /** Checks whether the queue is empty or not. */ boolisEmpty(){ return p_start >= data.size(); } };