<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Greedy on Dmytro&#39;s Blog</title>
    <link>https://dmytros.blog/tags/greedy/</link>
    <description>Recent content in Greedy on Dmytro&#39;s Blog</description>
    <image>
      <title>Dmytro&#39;s Blog</title>
      <url>https://dmytros.blog/images/papermod-cover.png</url>
      <link>https://dmytros.blog/images/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 26 Apr 2026 08:45:38 +0300</lastBuildDate>
    <atom:link href="https://dmytros.blog/tags/greedy/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LeetCode - 150 - Jump Game II</title>
      <link>https://dmytros.blog/posts/leetcode-150-jump-game-ii/</link>
      <pubDate>Sun, 26 Apr 2026 08:45:38 +0300</pubDate>
      <guid>https://dmytros.blog/posts/leetcode-150-jump-game-ii/</guid>
      <description>&lt;h3 id=&#34;the-problem&#34;&gt;The problem&lt;/h3&gt;
&lt;p&gt;You are given a &lt;strong&gt;0-indexed&lt;/strong&gt; array of integers &lt;code&gt;nums&lt;/code&gt; of length &lt;code&gt;n&lt;/code&gt;. You are initially positioned at index 0.&lt;/p&gt;
&lt;p&gt;Each element &lt;code&gt;nums[i]&lt;/code&gt; represents the maximum length of a forward jump from index &lt;code&gt;i&lt;/code&gt;. In other words, if you are at index &lt;code&gt;i&lt;/code&gt;, you can jump to any index &lt;code&gt;(i + j)&lt;/code&gt; where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0 &amp;lt;= j &amp;lt;= nums[i]&lt;/code&gt; and&lt;/li&gt;
&lt;li&gt;&lt;code&gt;i + j &amp;lt; n&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Return &lt;em&gt;the minimum number of jumps to reach index&lt;/em&gt; &lt;code&gt;n - 1&lt;/code&gt;. The test cases are generated such that you can reach index &lt;code&gt;n - 1&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
