public static double BenchmarkDFS(Node root, int noOfRuns)
        {
            DepthFirstSearch dfs = new DepthFirstSearch();
            int    n = 10;
            int    count = noOfRuns;
            double dummy = 0.0;
            double st = 0.0, sst = 0.0;

            for (int j = 0; j < n; j++)
            {
                Timer t = new Timer();
                for (int i = 0; i < count; i++)
                {
                    dfs.IterativeSearch(root, true);
                }
                double time = t.Check() * 1e9 / count;
                st  += time;
                sst += time * time;
            }
            double mean = st / n, sdev = Math.Sqrt((sst - mean * mean * n) / (n - 1));
            string meanStr  = mean.ToString("#.0");
            string stdevStr = sdev.ToString("#.000");

            Console.WriteLine(meanStr + "\t\t" + stdevStr);
            using (System.IO.StreamWriter file =
                       new System.IO.StreamWriter(@"C:\Users\purke\Desktop\IPC\DFSTestRuns.txt", true))
            {
                file.WriteLine(meanStr + "," + stdevStr);
            }
            return(dummy / n);
        }
        public static double BenchmarkDFS(Node root)
        {
            int    n = 10, count = 1, totalCount = 0;
            double dummy = 0.0, runningTime = 0.0, st = 0.0, sst = 0.0;

            Console.WriteLine("mark5");
            Console.WriteLine(" Mean\t\tSTD\t\tcount");
            do
            {
                DepthFirstSearch dfs = new DepthFirstSearch();
                count *= 2;
                st     = sst = 0.0;
                for (int j = 0; j < n; j++)
                {
                    Timer t = new Timer();
                    for (int i = 0; i < count; i++)
                    {
                        dummy += dfs.IterativeSearch(root, true);
                    }
                    runningTime = t.Check();
                    double time = runningTime * 1e9 / count;
                    st         += time;
                    sst        += time * time;
                    totalCount += count;
                }
                double mean = st / n, sdev = Math.Sqrt((sst - mean * mean * n) / (n - 1));
                Console.Write(mean.ToString("#.0") + "\t\t" + sdev.ToString("#.000") + "\t\t" + count + "\n");
            } while (runningTime < 0.25 && count < Int32.MaxValue / 2);
            Console.WriteLine("DepthFirstSearch - done");
            return(dummy / totalCount);
        }