aboutsummaryrefslogtreecommitdiff
path: root/leetcode/lc-844-backspace-string-compare.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'leetcode/lc-844-backspace-string-compare.rkt')
-rw-r--r--leetcode/lc-844-backspace-string-compare.rkt17
1 files changed, 0 insertions, 17 deletions
diff --git a/leetcode/lc-844-backspace-string-compare.rkt b/leetcode/lc-844-backspace-string-compare.rkt
deleted file mode 100644
index a07ec3c..0000000
--- a/leetcode/lc-844-backspace-string-compare.rkt
+++ /dev/null
@@ -1,17 +0,0 @@
-#lang racket
-
-(define/contract (process-backspace-string strng)
- (-> string? string?)
- (apply ~a (for/fold ([str-out '()]
- #:result (reverse str-out))
- ([character (in-string strng)])
- (case character
- [(#\#) (if (empty? str-out)
- str-out
- (cdr str-out))]
- [else (cons character str-out)]))))
-
-(define/contract (backspace-compare s t)
- (-> string? string? boolean?)
- (equal? (process-backspace-string s)
- (process-backspace-string t))) \ No newline at end of file