<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on</title><link>https://bacarotech.github.io/tags/python/</link><description>Recent content in Python on</description><generator>Hugo</generator><language>it</language><lastBuildDate>Wed, 25 Feb 2026 14:00:41 +0000</lastBuildDate><atom:link href="https://bacarotech.github.io/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>CodingLeetCode - 2399 - Check Distances Between Same Letters</title><link>https://bacarotech.github.io/blog/2026/codingleetcode---2399---check-distances-between-same-letters/</link><pubDate>Wed, 25 Feb 2026 14:00:41 +0000</pubDate><guid>https://bacarotech.github.io/blog/2026/codingleetcode---2399---check-distances-between-same-letters/</guid><description>&lt;p&gt;Oggi vediamo il seguente esercizio di LeetCode:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You are given a string s consisting of lowercase English letters and an integer array distance of length 26.
For every letter from &amp;lsquo;a&amp;rsquo; to &amp;lsquo;z&amp;rsquo;, if it appears twice in s, the distance between its two occurrences must be equal to distance[i].
Return true if all distances match, otherwise return false.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Possiamo risolvere questo problema calcolando la distanza tra le due occorrenze di ogni carattere, come nei due codici proposti.&lt;/p&gt;</description></item><item><title>CodingLeetCode - 121 - Best Time to Buy and Sell Stock</title><link>https://bacarotech.github.io/blog/2026/codingleetcode---121---best-time-to-buy-and-sell-stock/</link><pubDate>Wed, 25 Feb 2026 14:00:23 +0000</pubDate><guid>https://bacarotech.github.io/blog/2026/codingleetcode---121---best-time-to-buy-and-sell-stock/</guid><description>&lt;p&gt;Oggi vediamo il seguente esercizio di LeetCode:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You are given an array prices where prices[i] is the price of a given stock on the i-th day.
You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock.
Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.&lt;/p&gt;</description></item></channel></rss>