<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>invariant - string</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/string/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/string/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>
    <entry xml:lang="en">
        <title>ZigZag Conversion</title>
        <published>2022-06-09T00:00:00+00:00</published>
        <updated>2022-06-09T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              alikhalilli
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://invariant.khalilli.ai/blog/zigzag-conversion/"/>
        <id>https://invariant.khalilli.ai/blog/zigzag-conversion/</id>
        
        <summary type="html">
&lt;link rel=&quot;stylesheet&quot; href=&quot;https:&#x2F;&#x2F;invariant.khalilli.ai&#x2F;admonition.css?h=98c1477488c4b2c9d71a&quot; type=&quot;text&#x2F;css&quot;&gt;

&lt;div
  class=&quot;my-4 flex flex-col rounded-lg bg-(--admonition-bg)&quot;
  style=&quot;--admonition-bg: var(--admonition-question);&quot;
&gt;
  &lt;div class=&quot;flex items-center rounded-t-lg bg-(--admonition-bg) p-1&quot;&gt;
    &lt;div
      class=&quot;mx-2 h-4 w-4 text-[0px] [background:var(--url)_center_center_no-repeat] dark:invert&quot;
      style=&quot;--url: url(icons&#x2F;question.svg);&quot;
    &gt;
      question
    &lt;&#x2F;div&gt;
    &lt;span&gt;&lt;strong&gt;Problem&lt;&#x2F;strong&gt;&lt;&#x2F;span&gt;
  &lt;&#x2F;div&gt;
  &lt;div class=&quot;pl-4&quot;&gt;&lt;p&gt;Print the string “SALAM” in a zigzag pattern on a given number of rows.&lt;&#x2F;p&gt;
&lt;&#x2F;div&gt;
&lt;&#x2F;div&gt;</summary>
        
    </entry>
</feed>
