sir u are world greatest teacher aapse padh ke kabhi bhi bore nhi hote h chahe wo lecture kitne bhi ghnte ka kyu na ho aapse ek reqest hai aap please tree ka lectue laiye aur is dsa series ko continue kigiye
@Aman-dh9wz4 ай бұрын
Pw website pe hai video bhai .
@siddharthasingh6680 Жыл бұрын
Sir, It's a request. After completing this series please make videos on miscellaneous questions so that we get an idea how to find which data structure to use in which question.
@manishdhekane539311 ай бұрын
In depth explanation Thanks for this amazing lecture.
@ShachiSinghal-fi6uh Жыл бұрын
I hope one day, I can also think whole logic on my own.
@great.Indian.culture3 ай бұрын
It will come in future sure if u feel it today.
@deevyanshutiwari185519 күн бұрын
Q5) In while condition write like this -> while(st.size()>0 && st.peek()
@AnanyaShukla-z6r Жыл бұрын
1:14:57 in ques 5 it shoud be while(st.size()>0 && st.peek()
@inspirationknowledge728 Жыл бұрын
I detect this error by chatgpt
@subhadeeppaul175111 ай бұрын
Brother, I have faced this issue also...Can You explain it little bit, because I'm little bit confused with this issue.
@Sun_shINE090511 ай бұрын
dekh agar stack ka size zero hogaya hoga toa peek kareaga toa error aayga na,isliye phele he check kar le ki kahi zero toa nahi hai@@subhadeeppaul1751
@mvenkataadityaprakash94858 ай бұрын
Since if we do as the sir is doing then we are performing operations on the stack without knowing the size(for suppose if the size is zero and you are again trying to pop the element when there is no element in the stack so that's why we have to do like this hope you like it !!!!!!@@subhadeeppaul1751
@deekshithapendela17605 ай бұрын
@@subhadeeppaul1751 suppose if our stack is empty and we are peeking the top element then it will give error saying that stack is empty thts y we added another condition making sure that stack is not empty while peeking the element.
@tricksforsolving28045 ай бұрын
1:47:02 gfg class Solution { // Function to calculate the span of stock’s price for all n days. public static int[] calculateSpan(int price[], int n) { // Your code here Stack st=new Stack(); int res[]=new int[price.length]; res[0]=1; st.push(0); for(int i=1;i0 && price[st.peek()]
@unlocksmile Жыл бұрын
Etna achha koi sikha nahi sakta
@ShachiSinghal-fi6uh Жыл бұрын
Tapping rainwater was also tough.
@jeetukumar9148 Жыл бұрын
Sir please trees krana ab queqe ke baad,aapki wjh se DSA me mja aa rha h
@ayaaniqbal3531 Жыл бұрын
Thank you sir.Your videos are very helpful.😊
@arjcreators3474 Жыл бұрын
million times🙇♀ thanks sir
@sangamsaini138 Жыл бұрын
homework count wrong brackets public static int count(String str) { Stack stack = new Stack(); int ans = 0; for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); if(ch=='('){ stack.push(ch); } else{ if(stack.isEmpty()){ ans+=1; }else{ stack.pop(); } } } ans+=stack.size(); return ans; }
@akashgautam583 Жыл бұрын
int arr[] = {1,2,3,3,3,3,4,4,4,2,2,5,5,7,8} is not working. it's give ans only 1,7,8 but according to questions ans should be 1,2,7,8.. Please Discuss in next lecture.. Lecture is awesome...❤ Please reduce the time gap between uploading two consecutive lectures...
@itzMysterious17 Жыл бұрын
Iska answer Mila??
@Abhaykumar-lw7nrАй бұрын
sir please continue the course like :: TREE ,GRAPH , etc....🙏🙏🙏
@parthsaboo7832 Жыл бұрын
sir Q4 ka solution agr suppose array esa hua {1,2,2,1,3,10} toh answer expected toh 1,1,3,10 hoga but aayega 3,10 aapke code ke hisaab se.
@harshalwadne8519 Жыл бұрын
1,1,3,10 hi ayega bro coz we need to find consecutive sub sequence so in that sequence only 2 is repeating twice
@gayatripansare79809 ай бұрын
Yes, wrong ans ayega .
@codebyprince4562 Жыл бұрын
Maza aa Gaya Bhaiya...❤
@dcn467 Жыл бұрын
2:53:21 Mistake 😮😮 if we push 5 ,2,4,6 then min stack should be 5,2,2,4 but it will give 5,2,2,4
@sheetalsharma1675 Жыл бұрын
super sir stay blessed
@aarzumustafa4586 Жыл бұрын
public class Main { public static boolean balanceOrNot(String str) { int n = 0; for (int i = 0; i < str.length(); i++) { if (str.charAt(i) == '(') n++; else n--; } if (n == 0) return true; else return false; } public static void main(String[] args) { System.out.println(balanceOrNot("(()())")); } }
@maestro_Edikts_ Жыл бұрын
)()() yeh string balanced todi h?
@sakshitiwari1869 Жыл бұрын
College is the best
@mohdshahbazkhan620611 ай бұрын
Maza aa gaya
@PrashantGupta-c3m4 ай бұрын
Mazaa Aagya Sir 🥰 bas Last wale Ques me Hag diya 😅
@Aakash_Gupta9236Ай бұрын
Tamij?
@magicbullet2819 ай бұрын
Stock Span Problem 1:31:00 public static int[] stockSpan(int[] arr){ int[] res= new int[arr.length]; Stack st = new Stack(); res[0]=1; st.push(0); for(int i=1;i
@SonuGupta-ul8ep7 ай бұрын
Thanks bro
@mvenkataadityaprakash94858 ай бұрын
Sir at 1:23:15 if worst case (5,4,3,2,1) then we have to travel the whole array again O(n^2) only
@prashantsinha417 Жыл бұрын
Thanks, this is really helpful 🙂🙂
@AAYUSHISAINI-ps3xt Жыл бұрын
perfect.....just perfect!
@skmknowledge472 Жыл бұрын
Finally wait is over
@mathematicswithharshАй бұрын
45:51 😂😂😂😂😂😂😂😂😂😂
@samiranroyy170010 ай бұрын
thank u sir
@cybernewton8190 Жыл бұрын
Maza aa gaya bhaiya
@Dhruv-v5o4j Жыл бұрын
Mazaa aa gya 🤩
@PhysicsSwami10 ай бұрын
hi sir, for you code on remove Consecutive subsequence which you have given at time stamp around 55-56 minutes in your lecture... if we put the input of array 123332445, then the solution should be 1225, but your code will give output 15.... WHY??... because after you pop 3 because of its repitition, your top of stack is 2 from before. then you are again going to the element 2 that lies after the 3's sequence. And your code compares it will top of stack via peek function and thus removes that 2 also. But according to logic it shouldn't be removed as it is not in a consecutive sequence of 2's... PLEASE THINK OVER IT AND LET ME KNOW. Anyways very nice presentation sir. Thanks.
@patelvideos4347 Жыл бұрын
Sir next greater element code is not working properly..... It drop error a empty stack
@inspirationknowledge728 Жыл бұрын
If(st.size>0&&st.peek()
@priyanshgupta446410 ай бұрын
Wrong Answer Runtime: 0 ms Case 1 Case 2 Input nums = [1,2,1] Output [2,-1,1] Expected [2,-1,2] for nextgreaterelement2
@akashgautam583 Жыл бұрын
Very Very Thank You Sir..
@khansirlover3772 Жыл бұрын
Sir please 🙏 continue python lecture series by sudhshnsu sir❤❤
@mbl-md1yr Жыл бұрын
Hello Sir, I do have a request. Can you start a playlist of "PHP with DSA course" on this channel? It will be helpful for many people.
@vishalv446411 ай бұрын
what the
@manishrajbhar702610 ай бұрын
class Solution { public static int[] calculateSpan(int price[], int n) { Stack st = new Stack(); int[] ans = new int[n]; ans[0] = 1; for (int i = 1; i < n; i++) { while (st.size() > 0 && price[st.peek()]
@_hustler_boy8 ай бұрын
please make video more on dsa
@aryansrivastava6064 Жыл бұрын
Are koi c++ ki series bhi complete kra do
@krishnanayak34924 күн бұрын
Last wala kis kis ko hwa ho gya😂😂😂
@NehaTyagi-s7z7 ай бұрын
Q3 sol=>public static boolean isValid(String s) { Stack st = new Stack(); for (int i = 0; i < s.length(); i++) { char ch = s.charAt(i); if (ch == '(' || ch == '[' || ch == '{') { st.push(ch); } else { if (st.isEmpty()) { return false; } else { char top = st.pop(); if ((ch == ')' && top != '(') || (ch == ']' && top != '[') || (ch == '}' && top != '{')) { return false; } } } } return st.isEmpty(); }
@_hustler_boy8 ай бұрын
dsa placement series aisi hi ek ek topic krwana please
@forbiddenmemes Жыл бұрын
Trees
@daredevilmax Жыл бұрын
Bhaiya plz complete DSA in c language
@pankaj.k_shorts Жыл бұрын
Sir ap kan nextgreater element wala code nahi kam kar rha hai error aa rha hai
@ayushdhiman83295 ай бұрын
stock span problem n-1 to 0 Loop me kese kare mere se nhi ho raha bus itna hi hua koii help kardo isme Stack st = new Stack(); int[] ans = new int[n]; for(int i=price.length-1; i>=0; i--){ while(st.size()>0 && price[st.peek()]
@A_WAY_TO_BETTER_LIFE Жыл бұрын
Sir ,please graduation ke courses bhi laiye , discrete mathematics aur probability jaise subs
@daredevilmax Жыл бұрын
Bhaiya plz complete dsa in c
@daredevilmax Жыл бұрын
also the dynamic programming
@Sharmaji_ki_ldki Жыл бұрын
bhaiya bhut confuse ho appp....kudh k dount clear krlo then btana ...ek k baad ek pura code hi change krdete ho yr
@lofi77773 ай бұрын
Always respect our teacher IIT kanpur Aap btaye apne college ka name...?
@ARCHITxEDITSАй бұрын
@@lofi7777 Dholakpur University
@VedPrakash-zs3wx9 ай бұрын
balance bracket me iska true hoga ya false ) ( ) ( ) (
@vamshi73107 ай бұрын
False
@priyanshukhandelwal6631 Жыл бұрын
awaj dheeme aati h....please try to improve
@deepakkumar13204 Жыл бұрын
Sir this test case par [{)) apka code wrong aa rha
@sayankuila398 Жыл бұрын
Histogram Bala qs bhot hard ha😢
@VinaySharma-pz9tr Жыл бұрын
aditya verma se kr le
@anassaif3181 Жыл бұрын
Why always directly jumping to solution! ??? Will never tell How to think ? What should be the approach??
@Luffy_2804 Жыл бұрын
arey bhai koi tere ko sochna thodi sikhayega :) yeh sab maths ki problem ki trh hai jese kuch problems ke bad ek pattern follow hota hai wese bina dekhe koi nhi kar skta phle bar mai easy problem ke alawa : ) these problems just help to crack interview nothing more then that
@suryakantabehera4901 Жыл бұрын
sir u were saying Google is coming in july month,so its coming to pw or we have to apply ourselves,sir we dont have placement related ideas about these maang companies,so sir plz explain about the procedure to apply for these companies.
@Milan_verma0179 ай бұрын
bro needs to improve more in codes......totally confused.Not a "Alakh sir's" level
@52nevil36 Жыл бұрын
Sir please trees krana ab queqe ke baad,aapki wjh se DSA me mja aa rha h