<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>invariant - manacher</title>
    <subtitle>Essays on algorithms and data structures by Ali Khalilli. Binary search, numerical methods, dynamic programming, graphs, strings.</subtitle>
    <link rel="self" type="application/atom+xml" href="https://invariant.khalilli.ai/tags/manacher/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://invariant.khalilli.ai"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2022-06-13T00:00:00+00:00</updated>
    <id>https://invariant.khalilli.ai/tags/manacher/atom.xml</id>
    <entry xml:lang="en">
        <title>Manacher&#x27;s Algorithm</title>
        <published>2022-06-13T00:00:00+00:00</published>
        <updated>2022-06-13T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              alikhalilli
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://invariant.khalilli.ai/blog/manachers-algorithm/"/>
        <id>https://invariant.khalilli.ai/blog/manachers-algorithm/</id>
        
        <summary type="html">&lt;p&gt;There are multiple different ways of implementation for this problem, like DP(lcs, etc), expanding from center.
But the most optimal approach is Manacher’s Algorithm, time complexity: O(n).
It’s core idea is calculating current palindrome information based on previous calculated palindrome information.
Let’s draw it and see some formulas and implications.&lt;&#x2F;p&gt;</summary>
        
    </entry>
</feed>
