<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anton0825</author_name>
  <author_url>https://blog.hatena.ne.jp/anton0825/</author_url>
  <blog_title>日々精進</blog_title>
  <blog_url>https://anton0825.hatenablog.com/</blog_url>
  <categories>
    <anon>IT</anon>
  </categories>
  <description>今回のお題はこちら。 本の回答例で先頭と末尾の文字のどちらをtに移すか判定するところをforループを使って処理していましたが、再帰を使って書いてみました。 こっちの方がすっきりしてていいですね。 あーでもInputの文字数が2000文字までだから、コールスタックが最大1000積まれることになりますね。オーバーフローしそう。。 s = &quot;ACDBCB&quot; #input $t = &quot;&quot; def isFirstCharToElim?(str) if str.length &lt;= 1 then return true elsif str[0] &lt; str[-1] then return true elsi…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanton0825.hatenablog.com%2Fentry%2F20110103%2F1293288294&quot; title=&quot;プログラミングコンテストチャレンジブック演習「best cow line」 - 日々精進&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>http://cdn-ak.f.st-hatena.com/images/fotolife/a/anton0825/20101225/20101225234026.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-01-03 23:44:54</published>
  <title>プログラミングコンテストチャレンジブック演習「best cow line」</title>
  <type>rich</type>
  <url>https://anton0825.hatenablog.com/entry/20110103/1293288294</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
