All pastes #921927 Raw Edit

fdsf

public text v1 · immutable
#921927 ·published 2008-02-28 13:46 UTC
rendered paste body
			Stack<int> a = new Stack<int>();
			a.Push(1);
			
			bool done = false;
			Stack<int> tmp = new Stack<int>();
			int n = a.Pop();
			while (!done && a.Count > 0)
			{
				if (n > a.Peek())
					done = true;
				else
					tmp.Push(a.Pop());
			}
			a.Push(n);
			while (tmp.Count > 0)
				a.Push(tmp.Pop());
			
			a.Push(6);
			
			done = false;
			tmp = new Stack<int>();
			n = a.Pop();
			while (!done && a.Count > 0)
			{
				if (n > a.Peek())
					done = true;
				else
					tmp.Push(a.Pop());
			}
			a.Push(n);
			while (tmp.Count > 0)
				a.Push(tmp.Pop());
			
			a.Push(-5);
			done = false;
			tmp = new Stack<int>();
			n = a.Pop();
			while (!done && a.Count > 0)
			{
				if (n > a.Peek())
					done = true;
				else
					tmp.Push(a.Pop());
			}
			a.Push(n);
			while (tmp.Count > 0)
				a.Push(tmp.Pop());
			a.Push(10);
			done = false;
			tmp = new Stack<int>();
			n = a.Pop();
			while (!done && a.Count > 0)
			{
				if (n > a.Peek())
					done = true;
				else
					tmp.Push(a.Pop());
			}
			a.Push(n);
			while (tmp.Count > 0)
				a.Push(tmp.Pop());