This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-package #:cl-user) | |
(defun sharp-exclamation-mark (stream _c _arg) | |
(declare (ignore _c _arg)) | |
(with-output-to-string (s) | |
(do ((level 1) | |
(prev (read-char stream) char) | |
(char (read-char stream) | |
(read-char stream))) | |
(()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; n-sum.ss | |
;;; 1. Two sum problem: https://leetcode.com/problems/two-sum/ | |
;;; 15. 3Sum problem: https://leetcode.com/problems/3sum/ | |
;;; 167. Two Sum II - Input Array Is Sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ | |
;;; 18. 4Sum problem: https://leetcode.com/problems/4sum/ | |
#!chezscheme | |
(library (n-sum) | |
(export n-sum) | |
(import (chezscheme)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; while.lisp | |
;;;; A solution to Hackerrank's While Language problem -- | |
;;;; https://www.hackerrank.com/challenges/while-language-fp/problem | |
;;;; Author: Tianyu Gu (macdavid313@gmail.com) | |
(in-package #:cl-user) | |
(defpackage #:while | |
(:use #:cl) | |
(:nicknames #:while-lang) | |
(:export #:gen-lisp-code #:run-program)) |