NUMBER OF PEOPLE VISIBLE IN A QUEUE | LEETCODE # 1944 | PYTHON MONOTONIC STACK SOLUTION
Автор: Cracking FAANG
Загружено: 2022-05-05
Просмотров: 9653
In this video we are solving an interesting Facebook interview question: Number of People Visible in a Queue (Leetcode #1944).
On the surface this question looks easy as there is a simple naive O(N^2) solution available to us but this is definitely not the optimal solution we want to go with here. There's a neat little monotonic stack solution that will provide us with a much better runtime complexity. Stay tuned to figure out how we solve it!
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: