Last active
December 26, 2015 06:39
-
-
Save podviaznikov/7109890 to your computer and use it in GitHub Desktop.
Find integer without a pair in the sequence. Clojure implementation.
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
(defn finditemwithoutpair [data] | |
(if (= 1 (count data)) | |
(first data) | |
(if (= (first data) (second data)) | |
(finditemwithoutpair (drop 2 data)) | |
(first data)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment