215
правок
Изменения
Очередь
,Нет описания правки
=== push ===
'''function''' push(x : '''T'''):
elements[tail] = x
tail = (tail + 1) % n
=== size ===
'''int''' size(s : '''stack<T>''')
'''if''' head > tail
'''return''' n - head + tail
=== push ===
'''function''' push(x : '''T'''):
element = tail
tail = list(x, NULL)
=== push ===
'''function''' push(x : '''T'''):
pushLeft(x)
=== pop ===