From c5fcf7179a83ef65c86c6a4a390029149e518649 Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Tue, 5 Oct 2021 21:49:54 +0200 Subject: Duzy commit ze smieciami --- Semestr 2/racket/solution.rkt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 Semestr 2/racket/solution.rkt (limited to 'Semestr 2/racket/solution.rkt') diff --git a/Semestr 2/racket/solution.rkt b/Semestr 2/racket/solution.rkt deleted file mode 100644 index 3643668..0000000 --- a/Semestr 2/racket/solution.rkt +++ /dev/null @@ -1,14 +0,0 @@ -#lang racket - -(provide heapsort) (require "leftist.rkt") - -(define (heapsort xs) - (define (create-heap xs res) - (if (null? xs) - res - (create-heap (cdr xs) (heap-insert (cons (car xs) (car xs)) res)))) - (define (heap-to-list h) - (if (heap-empty? h) - null - (cons (elem-val (heap-min h)) (heap-to-list (heap-pop h))))) - (heap-to-list (create-heap xs empty-heap))) \ No newline at end of file -- cgit v1.2.3