Advertisement
Guest User

sss

a guest
Oct 1st, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace BubbleSortĂ–vning
  9. {
  10. class Program
  11. {
  12. static void Main(string[] args)
  13. {
  14.  
  15.  
  16.  
  17. }
  18.  
  19. public String LinearSearch(Int32 length, Int32 repeats)
  20. {
  21. Random random = new Random(length);
  22. Stopwatch stopwatch = new Stopwatch();
  23. stopwatch.Start();
  24. for (Int32 i = 0; i < repeats; i++)
  25. {
  26. Int32 item = random.Next(length);
  27. // INCLUDE THE LINEAR SEARCH HERE
  28.  
  29.  
  30.  
  31.  
  32. }
  33.  
  34.  
  35. stopwatch.Stop(); return repeats +
  36. "linear searches in [ms]: " +
  37. stopwatch.ElapsedMilliseconds;
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement