[13] Final. All is complete

This commit is contained in:
shapovalovka 2026-05-25 11:58:51 +03:00
parent 83e323fff6
commit 41004bcb8a
31 changed files with 1918 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,48 @@
import csv
import matplotlib.pyplot as plt
array_arr = []
array_list = []
array_hash = []
array_bin = []
with open('results.csv', 'r', encoding='utf-8-sig') as file:
reader = csv.reader(file, delimiter=';')
next(reader) # пропускаем заголовок
values = []
for row in reader:
values.append(float(row[3]))
array_arr = values[0:4]
array_list = values[4:8]
array_hash = values[8:12]
array_bin = values[12:16]
print(f"array_arr : {array_arr}")
print(f"array_list: {array_list}")
print(f"array_hash: {array_hash}")
print(f"array_bin : {array_bin}")
l = [1, 2, 3, 4]
#визуализация без дерева
plt.plot(l, array_arr, label = 'Array', c='black')
plt.plot(l, array_list, label = 'Linked list', c='blue')
plt.plot(l, array_hash, label = 'Hash table', c='orange')
plt.ylabel('array') #название по y
plt.xlabel('l') #название по x
plt.legend(loc='upper center', bbox_to_anchor=(0.5, 1.15), ncol = 3)
plt.savefig('t1p1.png', dpi=300, bbox_inches='tight') #сохранение в файле
plt.show()
#визуализация с деревом
plt.plot(l, array_arr, label = 'Array', c='black')
plt.plot(l, array_list, label = 'Linked list', c='blue')
plt.plot(l, array_hash, label = 'Hash table', c='orange')
plt.plot(l, array_bin, label = 'Binary tree', c='red')
plt.ylabel('array') #название по y
plt.xlabel('l') #название по x
plt.legend(loc='upper center', bbox_to_anchor=(0.5, 1.15), ncol = 4)
plt.savefig('t1p2.png', dpi=300, bbox_inches='tight') #сохранение в файле
plt.show()

View File

@ -0,0 +1,9 @@
Структура;Режим;Операция;Время (сек)
Array;случайный;вставка (в начало);0.06431880006566644
Array;отсортированный;вставка (в начало);0.06380272014066576
Array;любой;поиск 110 записей;0.07721293987706304
Array;любой;удаление 50 записей (среднее);0.0018548803813755513
Linked list;случайный;вставка (в начало);0.01246960014104843
Linked list;отсортированный;вставка (в начало);0.007890580128878355
Linked list;любой;поиск 110 записей;0.23582311999052763
Linked list;любой;удаление 50 записей (среднее);0.0023578427862375973
Internal Server Error - DRE.lab repo

Internal Server Error

Gitea Version: 1.22.0