2116. Check if a Parentheses String Can Be Valid | Stack | Constant Space

preview_player
Показать описание
In this video, I'll talk about how to solve Leetcode 2116. Check if a Parentheses String Can Be Valid | Stack | Constant Space

Let's Connect:

✨ Timelines✨
0:00 - Problem Statement
1:55 - Intuition for Problem
4:08 - Explanation & Dry Run
15:00 - Code Explanation
18:50 - Intuition for O(1) space
21:20 - Explanation & Dry Run
33:00 - Code Explanation

✨ Hashtags ✨
#programming #Interviews #leetcode #faang #maang #datastructures #algorithms
Рекомендации по теме
Комментарии
Автор

Hi Aryan
Why do we always choose openBracket over the unLocked? I understand it is helpful to preserve something which can be used as anything.
Let's consider the following ( * ) ), In this subpart of a problem, for the first closing bracket it makes sense to utilize * over ( because of the pos it is in?

vinaygodaba
Автор

Which tablet you use for writing the code, please reply back :)

abhishekmahajan
Автор

The part where you explained the space optimization felt more like a code walk-through. Did not get the intuition behind it.

SiddharthSingh-vuke
Автор

Pls change the color 0ls it very dim while seeing insead of red pls use any other color

lovelyhari
visit shbcf.ru