L14. N-Queens | Leetcode Hard | Backtracking

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ต.ค. 2024

ความคิดเห็น • 487

  • @takeUforward
    @takeUforward  3 ปีที่แล้ว +101

    Instagram for live updates about channel and live sessions: striver_79

    • @raghurajan2167
      @raghurajan2167 3 ปีที่แล้ว +3

      Java explanation missing

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +14

      @@raghurajan2167 this won’t be needing a Java explanation, just for loops used, hence you can see the cpp code and check the java code in description

    • @protyaybanerjee5051
      @protyaybanerjee5051 3 ปีที่แล้ว +2

      @@raghurajan2167 Here you go - Shorter, intuitive code in Java
      private void nQueenRecurse(int row, List positionStr, int n, List res,
      List placements) {
      if (n == row) {
      res.add(new ArrayList(positionStr));
      return; // backtrack
      }
      for (int col = 0; col < n; col++) {
      placements.add(col);
      if (isValidPlacement(row, placements)) {
      // Build the locationString
      StringBuilder qLocation = new StringBuilder(".".repeat(n));
      qLocation.setCharAt(col, 'Q');
      positionStr.set(row, qLocation.toString());
      nQueenRecurse(row + 1, positionStr, n, res, placements);
      }
      placements.remove(placements.size() - 1);
      }
      }
      private boolean isValidPlacement(int currentRow, List previousPlacements) {
      for (int i = 0; i < currentRow; i++) {
      int diff = Math.abs(previousPlacements.get(i) - previousPlacements.get(currentRow));
      // Column Conflict & Diagonal conflict check
      if (diff == 0 || diff == currentRow - i)
      return false;
      }
      return true;
      }

    • @jalajyadav7074
      @jalajyadav7074 3 ปีที่แล้ว +1

      @Striver sir, i think that this is even more efficient than your last solution
      class Solution {
      public:
      vector umap={-1,-1,-1,-1,-1,-1,-1,-1,-1};
      bool is_safe(vector& vec,int row,int col,int n){
      int i = 1;
      col--;
      while(col>=0){
      if(umap[col]==-1 or umap[col]==row or umap[col]==row-i or umap[col]==row+i)
      return false;
      col--;i++;
      }
      return true;
      }
      void dfs(vector& res,vector&vec,int col,int n){
      if(col==n){
      res.push_back(vec);
      return;
      }
      for(int i = 0;i

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +14

      @@jalajyadav7074 nah, your safety checks more time, my one is o(1)

  • @nishant3904
    @nishant3904 ปีที่แล้ว +112

    Finding previous Queens in just O(1) time was Amazing, learning so many things in Recursion!

  • @coding8000
    @coding8000 2 ปีที่แล้ว +46

    The Explanation is at God Level and Best on Internet, thank you.

  • @noobCoder26
    @noobCoder26 3 ปีที่แล้ว +59

    Thanks Striver Vaiyaa for this premium class explaination .
    U made this hard level problem looks very simple and easy .

  • @rohan8758
    @rohan8758 2 หลายเดือนก่อน +5

    Great explanation Striver, sometimes i wonder, when that day come to my life when i will be able to think like you while solving DSA problems like you did. You are real hero of my life. Hats off to you!

  • @akshatagarwal8125
    @akshatagarwal8125 2 ปีที่แล้ว +457

    Thanks man, really appreciate your efforts

    • @RohitKumar-fy9fp
      @RohitKumar-fy9fp ปีที่แล้ว +2

      bhai 200 m kya hota h aaj kl 😂

    • @nasim3987
      @nasim3987 ปีที่แล้ว +64

      @@RohitKumar-fy9fp showing respect and gratitude

    • @yashagarwal4388
      @yashagarwal4388 ปีที่แล้ว +39

      ​@@RohitKumar-fy9fptm kitna diye ho bhai?

    • @RohitKumar-fy9fp
      @RohitKumar-fy9fp ปีที่แล้ว +5

      @@yashagarwal4388 kyu bhai tm kitna de diye .

    • @063harshsahu2
      @063harshsahu2 ปีที่แล้ว +25

      @@RohitKumar-fy9fp haan toh kr de phir merko 200 , jb kuch nahi hota

  • @ryuzaki8142
    @ryuzaki8142 2 ปีที่แล้ว +65

    Hi Striver,
    Thanks a ton for your excellent videos.Honestly, I never thought i could solve all these hard problems or atleast understand them.But your explanation gave me the confidence and implanted a belief in myself that I too can solve problems.I will be forever grateful for your time and efforts kept in for teaching us.I hope you achieving everything that comes your way. Love you 3000❤

    • @parthsalat
      @parthsalat 2 ปีที่แล้ว +13

      Hmmm... so recursion is the secret behind L's intelligence.
      I'm going to tell Light about it!

  • @ferozqureshi5228
    @ferozqureshi5228 2 ปีที่แล้ว +15

    That’s insane bruh! You explained it like a “Hello, world!” program. I owe you a big one.

  • @cgoxo
    @cgoxo 2 ปีที่แล้ว +6

    Ever since I started watching your videos, I always wondered yaar yeh itna achha kaise samjha sakte hai.
    Hats off to your explanation. This is just pure gods work.

  • @ahanavishwakarma3956
    @ahanavishwakarma3956 2 ปีที่แล้ว +12

    This playlist is amazing! Never thought Backtracking would feel easy one day.

  • @pavanmutalikdesai6611
    @pavanmutalikdesai6611 2 ปีที่แล้ว +6

    Perfect Explanation. When you explain hard question, those questions look like easy. Amazing.

  • @santhoshs7028
    @santhoshs7028 ปีที่แล้ว +6

    Thank you for making the concept clear🤩.
    This playlist really helped me in leaning recursion and backtracking.
    I would really appreciate your efforts in making videos.
    YOU ARE TAKING ME FORWARD as the channel name suggests.

  • @chakravarty-with-a-v
    @chakravarty-with-a-v 2 ปีที่แล้ว +17

    In the "isSafe" function if you pass the board by reference, execution speed increases quite a bit.
    Not Passing by reference : 74 ms
    Passing by reference : 6 ms

    • @vaibhavnayak3416
      @vaibhavnayak3416 2 ปีที่แล้ว +1

      after time optimization it was fast.

    • @snehagoyal4978
      @snehagoyal4978 ปีที่แล้ว +2

      Yes this is because when we're not passing by reference, each time a new copy of board is created.

    • @himanshu7271
      @himanshu7271 ปีที่แล้ว

      Very true !🤗

  • @deveshlohumi7671
    @deveshlohumi7671 3 ปีที่แล้ว +15

    There is intuition to (n-1+col-row) as well, for every element of any matrix row-col and similarly col-row uniquely identifies the principal diagonal that element belongs to. In the worst case col can be 0 and row n-1 so we get -(n-1) , now this wouldn't be a problem if we were using map data structure but since we are using array we simply add (n-1) to the difference so that it starts from 0 and ends at index n-1+(n-1-0) = 2n-2 which is a total of 2n-1 elements.

    • @harshchoudhary4490
      @harshchoudhary4490 3 ปีที่แล้ว +1

      nice one

    • @ankitdubey9310
      @ankitdubey9310 3 ปีที่แล้ว

      excellent answer

    • @arnabchakraborty246
      @arnabchakraborty246 3 ปีที่แล้ว

      Grt

    • @SwapnilSarkar
      @SwapnilSarkar 2 ปีที่แล้ว

      Can you explain how it won’t be a problem if a map data structure is used?

    • @deveshlohumi7671
      @deveshlohumi7671 2 ปีที่แล้ว

      @@SwapnilSarkar Because keys in a map data structure can be negative, but array indices can't be.

  • @anupamdubey5736
    @anupamdubey5736 3 ปีที่แล้ว +4

    That part where you explained why don't we need the check the placement of the queen was lit. It was a doubt since long time. Thanks for your explanation. ♥

  • @NithinjainKathadka
    @NithinjainKathadka ปีที่แล้ว +5

    Man you give goosebumps every time i watch your videos. It's been long since I felt like this. Love you bro :)

  • @VisweshSuresh
    @VisweshSuresh ปีที่แล้ว +14

    For anyone trying to get the intuition behind the [n-1 + (col - row)] formula.
    I tried before watching that part, and I figured out that the values of (col - row) will range from -(n-1) , ..... 0 ...... , +(n+1) (total of 2n-1 values). So make a vector of that size.
    arr[0] has to represent n-1 . therefore to map the right index, the formula becomes
    (col-row) + n -1.
    Example: if n = 3, and (col-row) = -3, the hash of -3 has to be at the first index. -3 + (3-1) i.e, -3 + (n-1) will be 0.
    Hope I helped.

    • @aashish1206
      @aashish1206 ปีที่แล้ว

      but -3+(3-1) is -1 right?

    • @PeeyushSharma-pc8fc
      @PeeyushSharma-pc8fc หลายเดือนก่อน

      Little correction here, (col - row) will be -2 for n = 3 as row < n -> row < 3 so maximum low will be 2 for n = 3 and col will be zero and now -2 + (3 - 1) = 0

  • @muhammedimdaad
    @muhammedimdaad 11 หลายเดือนก่อน +10

    I was stuck on this one problem for months, because I didn't realize recursion is the choice to solve this problem. However even if I got the intuition of recursion, I might still have never solved this because I wasn't clear about the backtracking. You are a master of teaching, I never knew I would understand this and backtracking isn't as hard as I pictured it.
    Thank you

  • @ayush.kumar_02
    @ayush.kumar_02 3 ปีที่แล้ว +16

    I'm just searching explanation of n-queens problem and hear is it 😂... thanks striver ❤

  • @amangaud3207
    @amangaud3207 3 ปีที่แล้ว +15

    Thanks, Striver sir. This is the best explanation available for this problem.

  • @virajasmane3416
    @virajasmane3416 3 ปีที่แล้ว +17

    Bhai doing great work please continue doing what you are, you don't know how much help you're doing for the community. Mad respect and love❤️
    Bhagwan tumhe zindagi mai kabhi kuch kam na padne de🙌

  • @Mayanksingh-qp6dy
    @Mayanksingh-qp6dy 3 ปีที่แล้ว +1

    Watched other tutorials earlier too but watched this again. I must say I didn't find such good explanation with optimisation too. Thanks for the tutorial.

  • @CostaKazistov
    @CostaKazistov 2 ปีที่แล้ว +27

    Both educational and entertaining to watch 😃

  • @ShravanKumar-lq7et
    @ShravanKumar-lq7et 2 ปีที่แล้ว +9

    After 8th Lecture i have built up a great intution and tbh i have solved these problem on my own with your explanation. I can truly visualise the recursion now which i never did! Truly and amazing teacher you're!

  • @abhishekshah581
    @abhishekshah581 2 ปีที่แล้ว +2

    Generally, I don't comment on any TH-cam videos, But after watching this precise explanation, I could not resist myself to give a comment. You literally change the HARD tag to the EASY one from your description.

  • @codewithakki4559
    @codewithakki4559 2 ปีที่แล้ว +5

    Hi striver, for the upper diagonal check we can just use (row-col) as it is similar to the lower diagonal check rather than [(n-1)+(col-row)], Nice explanation though

  • @ajayraj1
    @ajayraj1 3 ปีที่แล้ว +6

    Explanation OP 🙌

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +2

      Haha, thanks bro.. ache se pdhai kro :P

  • @terabaap1775
    @terabaap1775 3 หลายเดือนก่อน

    our teacher taught this as if it were a problem about theory of relativity and you taught it like the alphabet. thank you so much

  • @tanmayjain5821
    @tanmayjain5821 ปีที่แล้ว

    Such a nice explanation!! loved it. The effort that you give to explain problem by writing down all the recursion tree is just unmatched.

  • @anshumanpanigrahi7817
    @anshumanpanigrahi7817 3 ปีที่แล้ว +3

    When this question comes up, everyone tends to explain the questions rather that telling the approach and backtracking. Thank you boss for your amazing teaching technique.

  • @harshsuryawanshi3262
    @harshsuryawanshi3262 2 ปีที่แล้ว +5

    I don't think on any platform there could be a better explanation to this problem than this one. Hat's off Striver !!!!

    • @subhajitchoudhury4981
      @subhajitchoudhury4981 2 ปีที่แล้ว

      you have java code ?

    • @piyushraj6927
      @piyushraj6927 ปีที่แล้ว

      If you think so, Neetcode's solution for N-queens is much more efficient, better and concise.

  • @sheharyarkhan5500
    @sheharyarkhan5500 ปีที่แล้ว

    Oh! my goodness what an explanation about hashing and storing the values. Making it optimised.
    owesome owesome!!!!!!

  • @vegitogamingpubg3364
    @vegitogamingpubg3364 3 ปีที่แล้ว +7

    You are the best teacher one can have. The pride of our college ❤

  • @KhsDorababu
    @KhsDorababu ปีที่แล้ว +1

    Thanks a lot for Your wonderful Lectures which made me to solve the problems very much better than previously and Your Step by step Explanations were too enough to get understand the concepts, Once again Thank You.

  • @rohitchanda8461
    @rohitchanda8461 ปีที่แล้ว +1

    What an explanation! Amazing! N-Queens has never seemed so easy before!

  • @shaurabhmishra6029
    @shaurabhmishra6029 29 วันที่ผ่านมา

    I've been searching for the good explanation then I found yours that's amazing thanks great work.

  • @prikshit8
    @prikshit8 3 ปีที่แล้ว +7

    please please complete this series before July. your content is better than paid content.

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +13

      Tab itna kam kyu dekhte ho XD

    • @ishankbansal9239
      @ishankbansal9239 3 ปีที่แล้ว +2

      @@takeUforward kyuki indians ko uski chiz ki kadar hoti h jismein unke paise lag rhe ho

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +12

      @@ishankbansal9239 Sahi baat h, islie sb paid ho raha hai...

    • @ishankbansal9239
      @ishankbansal9239 3 ปีที่แล้ว +3

      @@Tarunkumar_Gatla bro jo bhi channel agr kuch bhi padha rha hoga na uss par hamesha kam hi views aate h

  • @kartikeyasrivastava4798
    @kartikeyasrivastava4798 3 ปีที่แล้ว +2

    according to me x-y=k and x+y=k are equations of diagonals so for any two queens queen1 and queen2 x[1]-y[1]!=x[2]-y[2] and x[1]+y[1]!=x[2]+y[2] and x[1]!=x[2] and y[1]!=y[2].

  • @ananttyagi7372
    @ananttyagi7372 2 ปีที่แล้ว +1

    One of the most famous problems of all time. You made it look easy.

  • @tirthpatel20
    @tirthpatel20 ปีที่แล้ว

    For upper diagonal (row-col) will be same... we can use that instead of (n-1 + col - row) in hashing approach.

  • @nopecharon
    @nopecharon 2 ปีที่แล้ว +1

    Best instructor on TH-cam. Explains step by step

  • @abhisheksa6635
    @abhisheksa6635 11 หลายเดือนก่อน

    Awesome optimisations, farnkly I thought about one hashmap when I made my own theory of operations (I did through the row way where we iterate from column 0 to n-1) and I tracked all the columns with a hshmap, but the iteration was also nice that way the DS could be dropped but the diagonal ones need some hack.

  • @chetansahu1505
    @chetansahu1505 2 ปีที่แล้ว

    Awesome tricks to overcome the problem of diagonals hash.
    by taking 2n-1 size of hash-set.
    for left diagonal (as implied in the video) = row+col
    and for right (we can even do) = col-row

    • @TheDev05
      @TheDev05 ปีที่แล้ว

      I did the same, but with row+col and row-col.

  • @adityapandey4415
    @adityapandey4415 2 ปีที่แล้ว +1

    Hashing Part was something , I could have never think of. Thanks.

  • @kartikeyaagrawal8394
    @kartikeyaagrawal8394 3 ปีที่แล้ว +8

    This series is too op ! Can u also prepare a sheet or hint video about how to prepare for coding rounds ?

    • @takeUforward
      @takeUforward  3 ปีที่แล้ว +13

      Google striver’s cp sheet

  • @atharvakulkarni2024
    @atharvakulkarni2024 3 ปีที่แล้ว

    BEST EXPLANATION ON INTERNET EVER !!!! WONDERFULL AND INDEPTH EXPLANATION!!!

  • @aradhyapandey1489
    @aradhyapandey1489 ปีที่แล้ว

    You have taught so well!!
    Recursion feels so easy now, thank you so much for your efforts🙏

  • @arnabmondal81
    @arnabmondal81 4 หลายเดือนก่อน +1

    Striver I am from West Bengal. You are god of problem solving!! ❤❤❤❤❤❤

  • @aakashyadav6228
    @aakashyadav6228 3 ปีที่แล้ว +4

    Liked even before watching. That's your quality bro ! Top notch👌

  • @khatariinsaan5284
    @khatariinsaan5284 2 ปีที่แล้ว +1

    If someone don't know dsa, it is still understandable
    Just because of your Brillant Explanation !

  • @aanchalmittal9897
    @aanchalmittal9897 2 ปีที่แล้ว +1

    Brilliant!! No one would have made me understand n-queen better than this👏👏

  • @rocksrust
    @rocksrust 3 ปีที่แล้ว +3

    Pure stormed explanation! Great one bro , keep going, please finish it within july, or if you have works , please tell us free resources from where the other problems can be learnt!

  • @vamsikrishnagannamaneni912
    @vamsikrishnagannamaneni912 หลายเดือนก่อน

    We can also do row - col for upper_diagonal and use negative values for hashing if you are using dictionaries' in python they can hold negative keys as well

  • @karmanyaverma834
    @karmanyaverma834 3 ปีที่แล้ว +3

    This is God Level Explanation ! Thankyou Soo Much !

  • @aratrikchandra1787
    @aratrikchandra1787 ปีที่แล้ว +1

    Finding previous queens in constant time was great man!!!!

  • @gyaniyoda4608
    @gyaniyoda4608 หลายเดือนก่อน

    I was trying to decrease the space complexity for the previous queen from O(3n) to O(n), but then striver be like why not O(1) instead. Brilliant.

  • @darshantawte7435
    @darshantawte7435 2 ปีที่แล้ว

    I have seen countless Backtracking videos, but in all those videos it seemed like the teacher was trying to mug of the code. But yours is purely intution based hence understood better thank you.

  • @SydMohan
    @SydMohan ปีที่แล้ว +2

    Thanks a lot!! I don't think this can be explained any better.

  • @tanishqtyagi1465
    @tanishqtyagi1465 4 หลายเดือนก่อน

    That kind of optimization is damn good!!! This is next level and that explanation... I have no words to say.. fab work bhaiya🤠🤠

  • @funshowsdh1yl
    @funshowsdh1yl ปีที่แล้ว

    Best channel for data structures and algorithms, No one can ever match the content and explanation🤗

  • @shivankkapila2954
    @shivankkapila2954 ปีที่แล้ว

    I watched the same question on Aman Dhattarwal's channel. I must say that the way you explained it, it now looks like a piece of cake to me

  • @Tomharry910
    @Tomharry910 ปีที่แล้ว

    Very beautiful and simple to understand explainaton and code. Thank you so much!

  • @AnshuKumar-zn1qb
    @AnshuKumar-zn1qb 3 ปีที่แล้ว +1

    Striver bro u are just 🔥🔥🔥🔥🔥🔥🔥🔥 ... The best solution I have ever seen on youtube.....

  • @MohanaKrishnaVH
    @MohanaKrishnaVH 2 ปีที่แล้ว

    Great Explanation. The first approach for isSafe() method is quite intuitive. But, I think it is difficult to come up with the second approach if you have not solved the question beforehand.

    • @manistrikes
      @manistrikes 2 ปีที่แล้ว +1

      I thought of left row hashing by myself....but diagonal one was just insane..striver🔥

  • @bitturanjan9539
    @bitturanjan9539 3 ปีที่แล้ว +13

    Take U forward is turu lob ❤️

  • @bablushaw6856
    @bablushaw6856 2 ปีที่แล้ว +4

    I can't believe in myself that after watching this explanation part only(without pseudo code) I write N-queen's java solution correct in 1 attempt. I am improving. All thanks to you.

  • @vaalarivan_p
    @vaalarivan_p ปีที่แล้ว +3

    if u know chess: 7:00
    code walkthru: 19:45

  • @rohandsouza9147
    @rohandsouza9147 2 ปีที่แล้ว

    came here to look for optimized solution of N Queens xD after the 72+ offers video, Thanks for the optimization man, You are great!

  • @NirmalSilwal
    @NirmalSilwal 2 ปีที่แล้ว +2

    0:01 I hope you're also doing extremely well ❤

  • @suchithreddy733
    @suchithreddy733 2 ปีที่แล้ว +1

    Mannnnn....This is just amazing and the simplest explanation. Great work Striver bhai

  • @dhanashreegodase4445
    @dhanashreegodase4445 3 ปีที่แล้ว +3

    hi striver....what is the time and space complexity for efficient solution?

  • @gpraneeth7693
    @gpraneeth7693 3 หลายเดือนก่อน

    Actually i watched 2 times other videos but cant understand but strivers i just seen 1 time understood clearly
    Tq tq tq striver

  • @nikhilmadaan29
    @nikhilmadaan29 6 หลายเดือนก่อน

    just one word for this level of explanation!! LEGEND!!🙌

  • @nidhinishad7801
    @nidhinishad7801 ปีที่แล้ว

    class Solution:
    def solve(self,col,n,ans,board,leftRow,upperDiagonal,lowerDiagonal):
    # base case
    if col==n:
    ans.append(["".join(r) for r in board])
    # looping through row to check if we can put the queen or not
    for row in range(n):
    if leftRow[row] == False and upperDiagonal[row+col] == False and lowerDiagonal[n-1+col-row] == False:
    board[row][col]='Q'
    leftRow[row]=True
    upperDiagonal[row+col] =True
    lowerDiagonal[n-1+col-row]=True
    # going for next col
    self.solve(col+1,n,ans,board,leftRow,upperDiagonal,lowerDiagonal)
    # backtracking step now put
    board[row][col]='.'
    leftRow[row]=False
    upperDiagonal[row+col] = False
    lowerDiagonal[n-1+col-row] = False
    def solveNQueens(self, n: int) -> List[List[str]]:
    # striver
    # declare a list to store the board
    ans = []
    # declare the board row
    board = [["."] * n for _ in range(n)]
    # left row , upper diagonal, lower diagonal
    leftRow = [False for _ in range(n)]
    # why we have taken the size as 2*n-1
    # because row+column = diagonal
    upperDiagonal= [False for _ in range(2*n-1)]
    lowerDiagonal=[False for _ in range(2*n-1)]
    self.solve(0,n,ans,board,leftRow,upperDiagonal,lowerDiagonal)
    return ans

  • @moonlight-td8ed
    @moonlight-td8ed 3 หลายเดือนก่อน

    bruh my frnd is a noob in programming but after seeing your explanation, he is saying that coding is so easy... you make lives beautiful dude

  • @rudra_anand
    @rudra_anand ปีที่แล้ว

    You made this problem look so easy, great explanation. Thanks a lot

  • @YashKumar-lo6ot
    @YashKumar-lo6ot 2 ปีที่แล้ว

    Sir I have no words to explain how beautifully u explained this complex question with 2 approaches🙏🙏

  • @AbhishekKumar-vr7sh
    @AbhishekKumar-vr7sh 3 ปีที่แล้ว +4

    plz striver bhaiya july end se pehle sare videos sde sheet ke upload kr dijiye. Placement mein bhut help mil jayega🙏

  • @Aezakmi-iu7wk
    @Aezakmi-iu7wk 3 วันที่ผ่านมา

    I think we don't require two hash lists for diagonals
    It can be done using one hash list

  • @KapilMaan-vw9sd
    @KapilMaan-vw9sd หลายเดือนก่อน

    best video ever on N queens sir
    really proud of you !!!

  • @prithvirohira1372
    @prithvirohira1372 ปีที่แล้ว +1

    Thank you for all the efforts striver. Very well explained.

  • @suyashjain3223
    @suyashjain3223 ปีที่แล้ว

    What a Explanation!!! Simply Amazing!!

  • @anuragkumariitr
    @anuragkumariitr ปีที่แล้ว

    nice explanation. Is it possible to solve a problem like this in 30 mins when you have not solved the same before already?

  • @sagargoyal6993
    @sagargoyal6993 3 ปีที่แล้ว +1

    Best Explanation...and Your Graph Series is 💥❤️

  • @shreyasingh1258
    @shreyasingh1258 3 ปีที่แล้ว +1

    Best explanation! 🔥💯 complexity aur mention kar dete bhaiya..

  • @rushikeshkolgatram1053
    @rushikeshkolgatram1053 2 ปีที่แล้ว +2

    Thank you, striver it's a wonderful explanation.

  • @devinpadron5
    @devinpadron5 2 หลายเดือนก่อน

    phenomenal explanation. Great teacher!

  • @NinjaDevPlays
    @NinjaDevPlays ปีที่แล้ว +1

    Seea lot of vidios but cannot understand.but after seeing your vidio i feel very easy
    Without striver DSA not exist

  • @easycode3189
    @easycode3189 2 ปีที่แล้ว +1

    Thanks A lot Striver this video is very useful to understand easily

  • @aniketnangare904
    @aniketnangare904 ปีที่แล้ว +1

    Thanks a ton man can't thank you enough for explaining this concept beautifully

  • @cinime
    @cinime ปีที่แล้ว

    Understood! Super amazing explanation as always, thank you very much!!

  • @hmtg11
    @hmtg11 ปีที่แล้ว +1

    @take U forward
    bhaiya the c++ code which you wrote before using hashing is not running ...please tell if there is any problem in the non hashing code

  • @anmolverma075
    @anmolverma075 2 ปีที่แล้ว

    At 15:42 , when we got one ans in the 2nd column , while backtracking why we did not check for the right side of the 2nd recursive call box??

  • @mohdsameer2445
    @mohdsameer2445 ปีที่แล้ว

    Should've explained one of the approaches in Java .. would've helped sir

  • @anushkathakur6531
    @anushkathakur6531 ปีที่แล้ว +1

    Could you please tell the time and space complexities of both the approaches?

  • @its_chirantan
    @its_chirantan 3 ปีที่แล้ว +1

    Very good explanation! Got the intuition. Thnx bhaiya.

  • @ShubhamPatidar16
    @ShubhamPatidar16 3 ปีที่แล้ว +4

    In the recursion series, we have used backtracking right? in most of the questions in which when we come back we remove that particular element from ds.

  • @andreyvalverde4780
    @andreyvalverde4780 2 ปีที่แล้ว +1

    Awesome explanation!!! Thank you very much!!!

  • @DeadPoolx1712
    @DeadPoolx1712 19 วันที่ผ่านมา

    Did it my self !!! felt amazing.

  • @beinghappy9223
    @beinghappy9223 2 ปีที่แล้ว +1

    One of the best explanation for N Queeen Problem
    Love u bhaiya ❤