Тёмный

1190. Reverse Substrings Between Each Pair of Parentheses | Leetcode Daily Challlenge | DSA | Hindi 

shashCode
Подписаться 16 тыс.
Просмотров 2,1 тыс.
50% 1

Problem Name:
1190. Reverse Substrings Between Each Pair of Parentheses
Problem Statement:
You are given a string s that consists of lower case English letters and brackets.
Reverse the strings in each pair of matching parentheses, starting from the innermost one.
Your result should not contain any brackets.
Problem Link:
leetcode.com/problems/reverse...
Graph Playlist:
• Graph Data Structure S...
Java Plus DSA Placement Course Playlist:
• Java and DSA Course Pl...
Java Plus DSA Sheet:
docs.google.com/spreadsheets/...
Notes:
github.com/Tiwarishashwat/Jav...
Telegram Link:
shashwattiwari.page.link/tele...
Ultimate Recursion Series Playlist:
• Recursion and Backtrac...
Instagram Handle: (@shashwat_tiwari_st)
shashwattiwari.page.link/shas...
Samsung Interview Experience:
• I cracked Samsung | SR...
Company Tags:
Facebook | Amazon | Microsoft | Netflix | Google | LinkedIn | Pega Systems | VMware | Adobe | Samsung
Timestamp:
0:00 - Introduction
#ShashwatTiwari #coding​​ #problemsolving​

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 18   
@shashwat_tiwari_st
@shashwat_tiwari_st 20 дней назад
Like target of today's videos is 90. Please do like if you understood the solution 😊
@aaryachoudhary7949
@aaryachoudhary7949 19 дней назад
That second approach is crazy!!!🔥
@RohitKumar-dz8dh
@RohitKumar-dz8dh 19 дней назад
Thanks 😊
@Anuragsharma056
@Anuragsharma056 19 дней назад
Nice approach and quality of teaching 🎉
@motivationalquotes6581
@motivationalquotes6581 19 дней назад
2 nd approach puri soch hi nahi sakta
@anishmangal9072
@anishmangal9072 19 дней назад
Nice Explanation.
@GirjeshSharma-zv3xo
@GirjeshSharma-zv3xo 20 дней назад
love from russia❤
@SulemanbhashaDodmni
@SulemanbhashaDodmni 19 дней назад
Due to your previous videos i alredy solved this question and now watching for optimal aproch . love you
@arnab027
@arnab027 20 дней назад
my approach was quite similar with your first approach ,only difference is that i didnt take any list i just considered a dummy string and manipulated it multiple times,but at last shocked by seeing n^2 complexity thatys why i was waiting for your video.
@shashwat_tiwari_st
@shashwat_tiwari_st 20 дней назад
String manipulation java me slow hota hai.. StringBuilder se try krlo instead of string, thoda better hoga but not very efficient.
@PiyushSharma-we8yd
@PiyushSharma-we8yd 20 дней назад
First view sir
@yashmatlani1976
@yashmatlani1976 20 дней назад
I Had a slightly different approach to this question . Instead of storing characters in stack , i maintained the index of last opening bracket whenever i encountered a closing one . and used a reverse function and made the recursive calls Below is my Code with Linear TC class Solution { string recur(string s,int idx,string res){ if(idx>=s.length()){ string final_ans = ""; for(char i : res){ if(i=='(' || i == ')') continue; final_ans += i; } return final_ans; } if(s[idx]=='(') { s1.push(idx+1); } if(s[idx]==')') { res = Rev(res,s1.top(),idx-1); s1.pop(); } return recur(s,idx+1,res+s[idx]); } string Rev(string s1,int s,int e){ while(s
@shashwat_tiwari_st
@shashwat_tiwari_st 19 дней назад
@@yashmatlani1976 impressive 👏 👌 great progress ✨️
@PiyushSharma-we8yd
@PiyushSharma-we8yd 20 дней назад
3:30 - Stack Approach 10:11 - Code for stack 13:27 - Approach 2 ( jo mai sapne me thanos ban kr sare infinity stones lekr bhi khud se nahi soch pata ) 23:45 - Code for Approach 2
@manideepsingh8035
@manideepsingh8035 19 дней назад
was able to think only even and odd cases uske baad approach he nhi bana😄
@maniprakash6960
@maniprakash6960 20 дней назад
Sir, please explain in English
@manabdebnath6223
@manabdebnath6223 19 дней назад
Dark mode par dry run kijiye na, aakh par dard hota hai
@shashwat_tiwari_st
@shashwat_tiwari_st 19 дней назад
@@manabdebnath6223 okay 👍
Далее
IQ Level: 10000
00:10
Просмотров 2,6 млн
I Solved 1583 Leetcode Questions  Here's What I Learned
20:37
This happens after giving 108 Software INTERVIEWs
13:35
DARKER SIDE of SOFTWARE ENGINEERING !!
12:09
Просмотров 136 тыс.
8 patterns to solve 80% Leetcode problems
7:30
Просмотров 276 тыс.