{"html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech-blog.pocket7878.com%2Fentry%2F2013%2F05%2F16%2F104402\" title=\"SuffixArray\u3092\u4f7f\u3063\u305f\u7c21\u6613\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3084\u3063\u3066\u307f\u305f\u3002 - Let&#39;s write \u03b2\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2013-05-16 10:44:02","categories":["Lisp"],"title":"SuffixArray\u3092\u4f7f\u3063\u305f\u7c21\u6613\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3084\u3063\u3066\u307f\u305f\u3002","blog_title":"Let's write \u03b2","url":"https://tech-blog.pocket7878.com/entry/2013/05/16/104402","width":"100%","version":"1.0","author_url":"https://blog.hatena.ne.jp/Pocket7878_dev/","type":"rich","blog_url":"https://tech-blog.pocket7878.com/","provider_name":"Hatena Blog","height":"190","author_name":"Pocket7878_dev","provider_url":"https://hatena.blog","image_url":null,"description":"\u6587\u5b57\u5217\u306e\u691c\u7d22\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u306b\u3064\u3044\u3066\u3057\u3089\u3079\u3066\u3044\u305f\u3089\u3001\u826f\u3044\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3092\u767a\u898b\u3057\u305f\u306e\u3067 \u3084\u3063\u3066\u307f\u307e\u3057\u305f\u3002 \u7c21\u5358\u306aWeb\u30b5\u30fc\u30c1\u30a8\u30f3\u30b8\u30f3\u306e\u4f5c\u308a\u65b9 (defun all-suffix-node (str) (loop for s from 1 to (length str) collect (cons s (subseq str (1- s))))) (defun suffix-array (str) (mapcar #'car (sort (all-suffix-node str) (lambda (a b) (string<= (cdr a) (cdr b)))))) (defun suffix (s\u2026"}