Ejemplo n.º 1
0
        public static void Main(string[] args)
        {
            myDS myds = new myDS();

            myds.Insert(11);
            myds.Insert(12);
            myds.Insert(13);
            myds.Insert(54);

            myds.Remove(12);
            List <int> testlist = myds.Peek();

            foreach (int i in testlist)
            {
                Console.WriteLine(i);
            }

            bool b = myds.Contains(34);

            Console.WriteLine(b);

            Console.WriteLine(myds.GetRandomElement());
            Console.WriteLine(myds.GetRandomElement());
            Console.WriteLine(myds.GetRandomElement());
            Console.WriteLine(myds.GetRandomElement());
        }
		public static void Main (string[] args)
		{
			myDS myds = new myDS ();
			myds.Insert (11);
			myds.Insert (12);
			myds.Insert (13);
			myds.Insert (54);

			myds.Remove (12);
			List<int> testlist = myds.Peek ();
			foreach (int i in testlist) {
				Console.WriteLine (i);
			}

			bool b = myds.Contains (34);
			Console.WriteLine (b);

			Console.WriteLine (myds.GetRandomElement ());
			Console.WriteLine (myds.GetRandomElement ());
			Console.WriteLine (myds.GetRandomElement ());
			Console.WriteLine (myds.GetRandomElement ());
		}