From 28c010ff95405d4a6e546477a7c2aca6c0313744 Mon Sep 17 00:00:00 2001 From: vybraniec <96824573+vybraniec@users.noreply.github.com> Date: Mon, 17 Jan 2022 13:31:11 +0100 Subject: [PATCH 1/2] =?UTF-8?q?Doda=C5=82am=20quicksort([],[])?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quicksort.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/quicksort.pl b/quicksort.pl index c18564e..1ed30fe 100644 --- a/quicksort.pl +++ b/quicksort.pl @@ -1,6 +1,7 @@ % Implementacja Quicksorta w Prologu % Autor korpo, https://github.com/korpo +project_dedalus_quicksort([],[]). project_dedalus_quicksort([X],[X]). project_dedalus_quicksort([X|Xs],Ys) :- project_dedalus_quicksort_helper_partition(Xs,X,Left,Right), From fe3e80afb10ecdc757c9f684bc2d76d300a08031 Mon Sep 17 00:00:00 2001 From: vybraniec <96824573+vybraniec@users.noreply.github.com> Date: Mon, 17 Jan 2022 13:34:59 +0100 Subject: [PATCH 2/2] =?UTF-8?q?Doda=C5=82am=20randseq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.pl b/tests.pl index fbaf4d2..62c42ab 100644 --- a/tests.pl +++ b/tests.pl @@ -7,7 +7,7 @@ sort(L, Sorted). test(quicksort,[nondet]) :- - L=[8,4,2,1,3,6,5,7,12,10,9,11,14,13,15], + randseq(15,15,L), project_dedalus_quicksort(L, Sorted), sort(L, Sorted).