This commit is contained in:
Electrominch
2022-10-12 02:30:23 +03:00
parent 02afed9c4c
commit 01c5720116
39 changed files with 517 additions and 30 deletions

View File

@@ -7,14 +7,14 @@ public class MyQueue
public void Push(int x)
{
while(_sOutput.TryPop(out int res))
while (_sOutput.TryPop(out int res))
_sInput.Push(res);
_sInput.Push(x);
}
public int Pop()
{
while(_sInput.TryPop(out int res))
while (_sInput.TryPop(out int res))
_sOutput.Push(res);
return _sOutput.Pop();
}