Liste des Groupes | Revenir à cl lisp |
On Sun, 16 Feb 2025 15:43:20 +0000, Madhu wrote:
Using a suitable implementaion in a stupid way:
(defun lca (string)
(map 'string 'code-char (lca::longest-inc-seq (map 'list 'char-code
string))))>and running it on to extract into a hashtable with the keys as lcas>(hash-table-count $h2)
;; => 20437>(gethash "abcde" $h2)
("oxylabracidae" "cerambycidae" "bambocciade" "amoebicide" "ambuscade"
"absconded" "aborticide")>(sort (mapcar (lambda (x) (cons (car x) (length (cdr x))))
>
(group2 (hash-keys $h2) :test #'= :key #'length))
#'< :key #'car)>;; "length of lca . number of words"
((2 . 241) (3 . 1596) (4 . 4833) (5 . 7024) (6 . 4961) (7 . 1545) (8 .
217)
(9 . 19) (10 . 1))
____________
>
(9 . 19) (10 . 1))
>
wow.... I'd love to know what these Longest words are!
who is the (sole) Grand winner?
Les messages affichés proviennent d'usenet.