Merge branch 'master' of github.com:DavidGailleton/42-Push_Swap into medium_algo

This commit is contained in:
Maoake Teriierooiterai
2026-01-09 14:57:41 +01:00

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */ /* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2026/01/09 11:05:37 by dgaillet #+# #+# */ /* Created: 2026/01/09 11:05:37 by dgaillet #+# #+# */
/* Updated: 2026/01/09 11:26:24 by dgaillet ### ########lyon.fr */ /* Updated: 2026/01/09 14:53:45 by dgaillet ### ########lyon.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@@ -40,7 +40,9 @@ float compute_disorder(char **strs)
total_pairs += 1; total_pairs += 1;
if (strs[i] > strs[j]) if (strs[i] > strs[j])
mistakes += 1; mistakes += 1;
j++;
} }
i++;
} }
return (mistakes / total_pairs); return (mistakes / total_pairs);
} }