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-896-monotonic-array.rkt | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 leetcode/lc-896-monotonic-array.rkt (limited to 'leetcode/lc-896-monotonic-array.rkt') diff --git a/leetcode/lc-896-monotonic-array.rkt b/leetcode/lc-896-monotonic-array.rkt deleted file mode 100644 index fa43244..0000000 --- a/leetcode/lc-896-monotonic-array.rkt +++ /dev/null @@ -1,16 +0,0 @@ -#lang racket -(define/contract (is-monotonic test-list) - (-> (listof exact-integer?) boolean?) - (cond [(empty? (cdr test-list)) #true] - [((car test-list) . > . (cadr test-list)) - (is-monotonic-direction test-list >=)] - [((car test-list) . < . (cadr test-list)) - (is-monotonic-direction test-list <=)] - [else (is-monotonic (cdr test-list))])) - -(define/contract (is-monotonic-direction test-list dir) - (-> (listof exact-integer?) procedure? boolean?) - (cond [(empty? (cdr test-list)) #true] - [((car test-list) . dir . (cadr test-list)) - (is-monotonic-direction (cdr test-list) dir)] - [else #false])) \ No newline at end of file -- cgit v1.2.3