public Tuple <double, double> RunDeletion(int arraySize, int nbArrays) { Init(arraySize, nbArrays); Stopwatch watch; double elapsedMsRedBlack = 0; double elapsedMsAVL = 0; for (int i = 0; i < nbArrays; i++) { RedBlackTree <int, string> rbTree = new RedBlackTree <int, string>(); rbTree.Add(0, "0"); watch = Stopwatch.StartNew(); rbTree.RemoveMin(); watch.Stop(); double ticks = watch.ElapsedTicks; double microseconds = (ticks / Stopwatch.Frequency) * 1000000; elapsedMsRedBlack += microseconds; AVL AVLtree = new AVL(arrays[i]); AVLtree.Add(0); watch = Stopwatch.StartNew(); AVLtree.Delete(0); watch.Stop(); ticks = watch.ElapsedTicks; microseconds = (ticks / Stopwatch.Frequency) * 1000000; elapsedMsAVL += microseconds; } elapsedMsRedBlack /= nbArrays; elapsedMsAVL /= nbArrays; return(new Tuple <double, double>(elapsedMsRedBlack, elapsedMsAVL)); }