Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void Main(String[] args)
- {
- Console.Write("Adam Suchan N = 4\n");
- int[] tab;
- int N = 400000;
- Random rand = new Random();
- Stopwatch zegar;
- for(int k = 1; k <= 10; k++)
- {
- tab = new int[N * k];
- for (int i = 0; i < N * k; i++)
- {
- tab[i] = i + 1;
- }
- zegar = new Stopwatch();
- zegar.Start();
- search(tab, rand.Next(1, tab.Length), 0, tab.Length);
- zegar.Stop();
- Console.WriteLine("{0} mikrosekund", zegar.Elapsed.TotalMilliseconds * 1000);
- }
- Console.ReadKey();
- }
Advertisement
Add Comment
Please, Sign In to add comment