Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,14 @@
(defn uniq-char-string [s]
(let [len (count s)]
(if (= len (count (set s)))
(println (format "All %d chars unique in: '%s'" len s))
(loop [prev-chars #{}
idx 0
chars (vec s)]
(let [c (first chars)]
(if (contains? prev-chars c)
(println (format "'%s' (len: %d) has '%c' duplicated at idx: %d"
s len c idx))
(recur (conj prev-chars c)
(inc idx)
(rest chars))))))))