<?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>Gas Station on Dmytro&#39;s Blog</title>
    <link>https://dmytros.blog/tags/gas-station/</link>
    <description>Recent content in Gas Station 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>Sat, 02 May 2026 10:02:45 +0300</lastBuildDate>
    <atom:link href="https://dmytros.blog/tags/gas-station/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LeetCode - 150 - Gas Station</title>
      <link>https://dmytros.blog/posts/leetcode-150-gas-station/</link>
      <pubDate>Sat, 02 May 2026 10:02:45 +0300</pubDate>
      <guid>https://dmytros.blog/posts/leetcode-150-gas-station/</guid>
      <description>&lt;h3 id=&#34;the-problem&#34;&gt;The problem&lt;/h3&gt;
&lt;p&gt;There are &lt;code&gt;n&lt;/code&gt; gas stations along a circular route, where the amount of gas at the &lt;code&gt;ith&lt;/code&gt; station is &lt;code&gt;gas[i]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You have a car with an unlimited gas tank and it costs &lt;code&gt;cost[i]&lt;/code&gt; of gas to travel from the &lt;code&gt;ith&lt;/code&gt; station to its next &lt;code&gt;(i + 1)th&lt;/code&gt; station. You begin the journey with an empty tank at one of the gas stations.&lt;/p&gt;
&lt;p&gt;Given two integer arrays &lt;code&gt;gas&lt;/code&gt; and &lt;code&gt;cost&lt;/code&gt;, return &lt;em&gt;the starting gas station&amp;rsquo;s index if you can travel around the circuit once in the clockwise direction, otherwise return&lt;/em&gt; &lt;code&gt;-1&lt;/code&gt;. If there exists a solution, it is &lt;strong&gt;guaranteed&lt;/strong&gt; to be &lt;strong&gt;unique&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
