N
N
Nika2018-10-17 13:51:56
C++ / C#
Nika, 2018-10-17 13:51:56

How to compare the execution time of sorts?

write a program that sorts an array of n elements with two sorts compare the execution time of sorts

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2018-10-17
@glamurniy_kluben

It is possible through Stopwatch.

Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
// Нужные действия для замера скорости.
stopwatch.Stop();

Console.WriteLine("Время выполнения: {0}", stopwatch.Elapsed);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question