From 8777ff071f7bb37631baa7b6717ad29961e50911 Mon Sep 17 00:00:00 2001 From: "H.J" Date: Wed, 9 Oct 2024 11:36:55 -0400 Subject: sorting by language --- leetcode/lc-953-alien-dictionary.rkt | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 leetcode/lc-953-alien-dictionary.rkt (limited to 'leetcode/lc-953-alien-dictionary.rkt') diff --git a/leetcode/lc-953-alien-dictionary.rkt b/leetcode/lc-953-alien-dictionary.rkt deleted file mode 100644 index f72a895..0000000 --- a/leetcode/lc-953-alien-dictionary.rkt +++ /dev/null @@ -1,26 +0,0 @@ -#lang racket - -(define/contract (is-alien-sorted words order) - (-> (listof string?) string? boolean?) - (define alpha-order - (make-hash (map (λ (a b) (cons a b)) - (map string (string->list order)) - (build-list (string-length order) identity)))) - (hash-set! alpha-order #\* -1) - (define (alien