✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Baikite įgyvendinti deko duomenų struktūros metodą popBack, kuris atsakingas už elemento ištrynimą iš deko pabaigos.
-----------------------------------------------------------------------------------------------------------------------
Kodas:
class DequeArray{private: int first, last; int deque[MAXSIZE] = { 0 };
public: DequeArray() //konstruktorius { first = -1; last = -1; }
void popBack() {
if (isEmpty()) { std::cout << "Dekas yra tuscias, nera ka trinti. \n"; return; }
if (first == last) { first = -1; last = -1; }
// BAIKITE PILDYTI KODĄ
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!