<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>python on Aryido Tech Note</title><link>https://aryido.github.io/tags/python/</link><description>Recent content in python on Aryido Tech Note</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Wed, 20 May 2026 09:30:14 +0800</lastBuildDate><atom:link href="https://aryido.github.io/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Manacher’s Algorithm</title><link>https://aryido.github.io/posts/algorithm/manacher/</link><pubDate>Wed, 20 May 2026 09:30:14 +0800</pubDate><guid>https://aryido.github.io/posts/algorithm/manacher/</guid><description>&lt;!-- raw HTML omitted -->
&lt;blockquote>
&lt;p>Manacher’s Algorithm (Manacher 的唸法&lt;code>/ˈmænəkər/&lt;/code>)，用是來尋找字串中&lt;a href="https://leetcode.com/problems/longest-palindromic-substring/description/">最長回文子串 (Longest Palindromic Substring)&lt;/a>的最好解法，時間複雜度可優化到了 &lt;strong>O(n)&lt;/strong>。 由於算是&lt;strong>是常考題&lt;/strong>，就花些時間了解一下吧。&lt;/p>
&lt;/blockquote></description></item><item><title>5. Longest Palindromic Substring</title><link>https://aryido.github.io/posts/leetcode/leetcode5/</link><pubDate>Wed, 14 Sep 2022 22:30:14 +0800</pubDate><guid>https://aryido.github.io/posts/leetcode/leetcode5/</guid><description>&lt;!-- raw HTML omitted -->
&lt;blockquote>
&lt;p>&lt;strong>&lt;a href="https://leetcode.com/problems/longest-palindromic-substring/description/">最長回文子串 (Longest Palindromic Substring)&lt;/a> 是常考題&lt;/strong>。Palindrome 就是順讀逆讀，字母都一樣的詞語，比如範例給的 「 bab 」、 「 bb 」 等等，實際單字如 「 level 」 也是一個的 Palindromic 單字。&lt;/p>
&lt;p>先熟悉「 Dynamic Programming - 2D matrix 」解和「 中心擴散法 (Expand Around Center) 」就好了，還有聽過最佳解 Manacher&amp;rsquo;s Algorithm，時間複雜度可優化到了 &lt;strong>O(n)&lt;/strong>，之後再花其他篇幅去補充。&lt;/p>
&lt;/blockquote></description></item></channel></rss>