changeset 52:468f82bd24ac

Update main.c Added merge_sort as a choosable option committer: GitHub <noreply@github.com>
author Pietro Molendys <89810437+Pedritos22@users.noreply.github.com>
date Wed, 02 Apr 2025 01:14:30 +0200
parents 8a9a7d020197
children d44c59576969
files src/main.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/main.c	Wed Apr 02 01:12:40 2025 +0200
+++ b/src/main.c	Wed Apr 02 01:14:30 2025 +0200
@@ -9,7 +9,7 @@
 int rect_width = 5;
 int space = 1;
 
-struct Algo algos[4];
+struct Algo algos[5];
 int selected_algo = 0;
 int algos_size;
 
@@ -311,6 +311,9 @@
 
 	strcpy(algos[3].name, "Insertion sort");
 	algos[3].function = insertion_sort;
+
+	strcpy(algos[4].name, "Merge sort");
+	algos[4].function = merge_sort;
 	
 	algos_size = sizeof(algos) / sizeof(algos[0]);