338
правок
Изменения
Очередь
,Нет описания правки
=== pop ===
pop()
if (!empty())
then x = elements[head]
head = (head + 1) % elements.length
tail.value = x
tail.next = null
if (size == 0)
then head = tail
else el.next = tail
=== pop ===
pop()
if (!empty())
then x = head.value
head = head.next
=== pop ===
pop()
if (rightStack.empty()) then if (!leftStack.empty()) then while (!leftStack.empty())
do rightStack.push(leftStack.pop)
return rightStack.pop()