<?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>Two_Pointers on Dmytro&#39;s Blog</title>
    <link>https://dmytros.blog/tags/two_pointers/</link>
    <description>Recent content in Two_Pointers 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 -- 0.147.1</generator>
    <language>en</language>
    <lastBuildDate>Thu, 03 Sep 2026 11:40:49 +0300</lastBuildDate>
    <atom:link href="https://dmytros.blog/tags/two_pointers/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LeetCode - Boats to Save People</title>
      <link>https://dmytros.blog/posts/leetcode-boats-to-save-people/</link>
      <pubDate>Thu, 03 Sep 2026 11:40:49 +0300</pubDate>
      <guid>https://dmytros.blog/posts/leetcode-boats-to-save-people/</guid>
      <description>&lt;h3 id=&#34;the-problem&#34;&gt;The problem&lt;/h3&gt;
&lt;p&gt;You are given an array &lt;code&gt;people&lt;/code&gt; where &lt;code&gt;people[i]&lt;/code&gt; is the weight of the &lt;code&gt;ith&lt;/code&gt; person, and an &lt;strong&gt;infinite number of boats&lt;/strong&gt; where each boat can carry a maximum weight of &lt;code&gt;limit&lt;/code&gt;. Each boat carries at most two people at the same time, provided the sum of the weight of those people is at most &lt;code&gt;limit&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Return &lt;em&gt;the minimum number of boats to carry every given person&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example 1:&lt;/strong&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
