<?xml version="1.0" encoding="UTF-8"?><oembed><type>video</type><version>1.0</version><html>&lt;iframe src=&quot;https://www.loom.com/embed/f024f5663110450399d54de3eccbfc04&quot; frameborder=&quot;0&quot; width=&quot;1244&quot; height=&quot;933&quot; webkitallowfullscreen mozallowfullscreen allowfullscreen&gt;&lt;/iframe&gt;</html><height>933</height><width>1244</width><provider_name>Loom</provider_name><provider_url>https://www.loom.com</provider_url><thumbnail_height>933</thumbnail_height><thumbnail_width>1244</thumbnail_width><thumbnail_url>https://cdn.loom.com/sessions/thumbnails/f024f5663110450399d54de3eccbfc04-80d486dab762b18f.gif</thumbnail_url><duration>300.1777</duration><title>Maximizing Stock Trading Profits Using Sliding Window Technique</title><description>In this video, I walk through the &quot;Best Time to Buy and Sell Stock&quot; problem from LeetCode, using a sliding window approach. I explain how to find the maximum profit by calculating the difference between the lowest and highest stock prices in a given array, with an example of prices: 10, 1, 5, 6, 7, and 1, which yields an output of 6. I detail the setup of left and right pointers and how to adjust them based on the conditions of the prices. The time complexity is O(n) and space complexity is O(1). I encourage viewers to follow along with the pseudocode and implement the solution themselves.</description></oembed>