Skip to content
Snippets Groups Projects
Commit 4d83de71 authored by Almohamed Alsadou Fatima's avatar Almohamed Alsadou Fatima
Browse files

chronometrage dune liste aleatoire

parent c3b317b5
No related branches found
No related tags found
No related merge requests found
......@@ -18,10 +18,12 @@ def liste_alea(n:int):
import matplotlib.pyplot as plt
#
#
#
#
# import matplotlib.pyplot as plt
#
# timeit.timeit(stmt='tri_select(liste_alea(TAILLE_MAX=100),comp)',"from math import", number=5000)
taille;"tri séléction";"tri insertion"
0; 0.00; 0.00
1; 0.00; 0.00
2; 1.00; 1.00
3; 3.00; 2.72
4; 6.00; 5.14
5; 10.00; 7.58
6; 15.00; 11.22
7; 21.00; 14.66
8; 28.00; 19.82
9; 36.00; 24.42
10; 45.00; 31.12
11; 55.00; 36.10
12; 66.00; 41.62
13; 78.00; 49.28
14; 91.00; 56.82
15; 105.00; 64.16
16; 120.00; 73.50
17; 136.00; 78.84
18; 153.00; 87.28
19; 171.00; 102.36
20; 190.00; 110.74
21; 210.00; 125.42
22; 231.00; 135.60
23; 253.00; 146.22
24; 276.00; 157.60
25; 300.00; 167.82
26; 325.00; 190.06
27; 351.00; 194.00
28; 378.00; 215.06
29; 406.00; 230.42
30; 435.00; 250.96
31; 465.00; 259.86
32; 496.00; 285.52
33; 528.00; 290.86
34; 561.00; 308.88
35; 595.00; 333.62
36; 630.00; 348.20
37; 666.00; 372.20
38; 703.00; 376.24
39; 741.00; 404.16
40; 780.00; 423.02
41; 820.00; 443.76
42; 861.00; 463.76
43; 903.00; 487.98
44; 946.00; 515.48
45; 990.00; 531.46
46; 1035.00; 567.76
47; 1081.00; 580.76
48; 1128.00; 613.26
49; 1176.00; 624.76
50; 1225.00; 640.10
51; 1275.00; 695.32
52; 1326.00; 717.46
53; 1378.00; 745.36
54; 1431.00; 763.18
55; 1485.00; 787.40
56; 1540.00; 816.32
57; 1596.00; 854.52
58; 1653.00; 876.46
59; 1711.00; 902.64
60; 1770.00; 944.56
61; 1830.00; 986.62
62; 1891.00; 998.08
63; 1953.00; 1050.62
64; 2016.00; 1074.78
65; 2080.00; 1113.34
66; 2145.00; 1135.74
67; 2211.00; 1139.86
68; 2278.00; 1209.60
69; 2346.00; 1223.22
70; 2415.00; 1243.44
71; 2485.00; 1312.36
72; 2556.00; 1316.80
73; 2628.00; 1386.06
74; 2701.00; 1408.24
75; 2775.00; 1433.12
76; 2850.00; 1477.94
77; 2926.00; 1534.38
78; 3003.00; 1592.66
79; 3081.00; 1633.82
80; 3160.00; 1699.66
81; 3240.00; 1714.40
82; 3321.00; 1743.38
83; 3403.00; 1788.74
84; 3486.00; 1824.26
85; 3570.00; 1887.38
86; 3655.00; 1851.02
87; 3741.00; 1953.50
88; 3828.00; 2002.08
89; 3916.00; 2056.00
90; 4005.00; 2067.58
91; 4095.00; 2158.96
92; 4186.00; 2179.82
93; 4278.00; 2218.98
94; 4371.00; 2288.60
95; 4465.00; 2286.06
96; 4560.00; 2358.12
97; 4656.00; 2454.54
98; 4753.00; 2466.52
99; 4851.00; 2505.24
100; 4950.00; 2573.28
......@@ -15,6 +15,8 @@ from typing import Callable
from compare import compare
from ap_decorators import count
from tris import *
import timeit
from LISTES import liste_alea
################################################
# ANALYSE EMPIRIQUE DES TRIS #
......
TP8/analyse-tris/tris_nbcomp.png

27.5 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment