FAANG Coding Interview Question - Container With Most Water (LeetCode)

Описание к видео FAANG Coding Interview Question - Container With Most Water (LeetCode)

🎧 Join the community Discord:   / discord  
💰 Support me on Patreon:   / michaelmuinos  
🔗Follow me on LinkedIn:   / michael-muinos  
📂Follow me on Github: https://github.com/MichaelMuinos

Check out my interview prep platform for learning the patterns!
📢 Interview Prep Platform: https://algoswithmichael.com

Container With Most Water is a popular LeetCode question asked at the FAANG (Facebook, Amazon, Apple, Netflix, Google) companies involving the use of two pointers. We must find the maximum area of a container we can create given the heights. The intuition behind the problem is you have two pointers, left and right, which moving inwards towards one another. To compute the area, we take our width which is right pointer minus left pointer and multiply it by our height which is the minimum between the heights at our left and right pointer. We move each pointer 1 by 1, specifically the pointer looking at the smaller height.

00:00 - Intro
00:51 - Problem description
01:23 - Algorithm walk through
08:40 - Code walk through
12:35 - Complexity Analysis

Комментарии

Информация по комментариям в разработке