<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sune2</author_name>
  <author_url>https://blog.hatena.ne.jp/sune2/</author_url>
  <blog_title>競技プログラミング+αなブログ</blog_title>
  <blog_url>https://sune2.hatenadiary.org/</blog_url>
  <categories>
    <anon>アルゴリズム</anon>
  </categories>
  <description>概要 何となく理解したので自分用のメモ 文字列 s を cyclic に回転させた時の辞書順最小の文字列を求める問題をO(n)で解く 呼び方が色々ありそうだけど Wikipedia の Lexicographically Minimal String Rotation (以下 LMSR) を採用するLMSR は Suffix Array でも求められそうだけどこっちのほうが効率いいだろうし文字列アルゴリズムの勉強ということで コード int LMSR(const string &amp;s) { string S = s + s; int N = S.size(); vector&lt;int&gt; f(N, …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsune2.hatenadiary.org%2Fentry%2F20150603%2F1433349724&quot; title=&quot;Lexicographically Minimal String Rotation (Booth&amp;#39;s Algorithm) - 競技プログラミング+αなブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-06-03 01:42:04</published>
  <title>Lexicographically Minimal String Rotation (Booth's Algorithm)</title>
  <type>rich</type>
  <url>https://sune2.hatenadiary.org/entry/20150603/1433349724</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
