Тёмный

6.1 N Queens Problem using Backtracking 

Abdul Bari
Подписаться 982 тыс.
Просмотров 2 млн
50% 1

N-Queens problem
state space tree
PATREON : www.patreon.com/bePatron?u=20...
Courses on Udemy
================
Java Programming
www.udemy.com/course/java-se-...
Data Structures using C and C++
www.udemy.com/course/datastru...
C++ Programming
www.udemy.com/course/cpp-deep...

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

 

23 фев 2018

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 485   
@tanmaychaudhary2801
@tanmaychaudhary2801 Год назад
It has been 5 years but still these videos are better than new ones by other youtubers.....i am referring to these in 2023...thank you sir
@jaspreetsinghkalsi2572
@jaspreetsinghkalsi2572 Год назад
me too mate
@nishaldevadiga6766
@nishaldevadiga6766 8 месяцев назад
yeah and his videos will be the best considering future as well! 👑
@arman9957
@arman9957 4 месяца назад
And now it is 2024, still it is better .
@vyombhatt44
@vyombhatt44 4 месяца назад
yea lol @@arman9957
@yaswanthkavuri71
@yaswanthkavuri71 Месяц назад
Now it's been 6 years lol😂
@Kuriocity
@Kuriocity 5 лет назад
*I am from ECE Background, trying my hard for product based companies and I want to thank Sir Abdul Bari for all the Concepts which helps me in competitive programming*
@manoja538
@manoja538 4 года назад
Bro u got placed?
@TG-ql2fv
@TG-ql2fv 3 года назад
No
@Kuriocity
@Kuriocity 3 года назад
@@manoja538 Yes bro,I graduated last year and had 3 job offers
@NS-sd3mn
@NS-sd3mn 3 года назад
@@Kuriocity lucky u, next year i have placement and i m scared to shit
@Kuriocity
@Kuriocity 3 года назад
@@NS-sd3mn don't worry... just keep practicing and solving questions and you ll get what you deserve
@ayounghosh9218
@ayounghosh9218 5 лет назад
thank you for all your lectures, you are like a god sent to us.
@saimahumma4724
@saimahumma4724 5 лет назад
Abdul Bari Sir I just wanted to thank you. I have successfully completed my M.Tech with good CGPA and yeah topped at college level. You contribute a lot to my grand success. Thanks a lot. But I regret for I could not find your videos during my B.Tech. Anyways, ALHAMDULILLAH. Now watching your videos to prepare for teaching demos.
@jayantkeer3416
@jayantkeer3416 6 лет назад
You are the best teacher of algorithm in RU-vid
@mohammedrafathali7702
@mohammedrafathali7702 2 года назад
Ok i can Proudly say that He was my lecturer At College ❤️
@Shubham_30_12
@Shubham_30_12 2 года назад
which college???
@siddharthmagadum16
@siddharthmagadum16 2 года назад
which college ?
@cursedblessing9619
@cursedblessing9619 2 года назад
@@Shubham_30_12 Muffakham Jah College of Engineering & Technology
@kausikkar2587
@kausikkar2587 2 года назад
@@cursedblessing9619 It is in Hyderabad, right?
@omerullah
@omerullah 2 года назад
@@kausikkar2587 yep, he is from Hyderabad. He once came to my college as well for a seminar.
@sandeepmandrawadkar9133
@sandeepmandrawadkar9133 5 лет назад
That's great contribution Professor! Everything in the presentation is superb - contents - speed of delivery - board usage - selected examples Everything Hats off to you Sir 🙏
@ojcgv21
@ojcgv21 3 года назад
A simple way to explain the N queens problem & solution, love it! Greetings from France
@aradhyasingh524
@aradhyasingh524 29 дней назад
😂🎉
@AnitShrestha
@AnitShrestha 5 лет назад
Thank you. One of the best description on Backtracking, and its difference with Dynamic Programming.
@nishes
@nishes 5 лет назад
i'm currently watching to save my self from failing my class thank you
@TridibSamanta
@TridibSamanta 5 лет назад
Great ! You are a great Teacher. Thanks for saving my Design and analysis of Algorithm Paper. #Respect
@LucasMagnum
@LucasMagnum 3 года назад
You are so good at explaining this. Thank you so much for your time!
@mranjaan5193
@mranjaan5193 Год назад
where are you from Lucas
@grasstoucher856
@grasstoucher856 Год назад
exceptional articulation sir. I myself get's confused going through it step by step while you're able to trace it accurately for each node. Really inspiring.
@kimmara6475
@kimmara6475 Год назад
Please shared me if you got any notes for tis.
@aries3690
@aries3690 2 года назад
Thank you so much for your videos! I am trying to self-learn competitive programming and your videos are a great help to so many students around the world! Keep doing what you do best!
@Lucifer-jl9vh
@Lucifer-jl9vh 2 года назад
Thank you Abdul Bari sir for your videos on Algorithms. They are helping a lot of students like me. Your work is very much appreciated.
@helalali6555
@helalali6555 4 года назад
Abdul bari is a awesome person..he cleared many of my concept....keep helping us Sir
@kaushalagrawal1620
@kaushalagrawal1620 4 года назад
halal means food that is allowed to eat allowed ali hahaha
@helalali6555
@helalali6555 4 года назад
@@kaushalagrawal1620 yes bro you are right but its helal that means moon
@samiazaman5240
@samiazaman5240 4 года назад
This is such a wonderfully satisfying concept, and a great video, too. Always love sir's peaceful energy.
@subinaypanda9936
@subinaypanda9936 3 года назад
This is very good sir. I was in very confusion of brute force searching of solutions of Sudoku. But the lectures of you have cleared this. Your explanation is too good and I am really very happy after seeing your videos. Thank you sir for teaching us.
@parneetkaur2588
@parneetkaur2588 5 лет назад
Everytime i used to watch your lectures but never bothered to comment...but sir you way of teaching is superb! Thank you for your lectures.
@shoaibMalik49
@shoaibMalik49 5 лет назад
Amazing sir. I loved your videos.. I'm watching these videos a night before exams
@shubhampandey8765
@shubhampandey8765 5 месяцев назад
Can't be grateful enough for this Man's work , hats off.
@sidindian1982
@sidindian1982 Год назад
Well Explained the Solutions .. specially that mirror image of last vedio footage 13:30 ... Thanks Sir
@Recordingization
@Recordingization 4 года назад
Thank you,Sir.You made the searching problem easy to understand.
@saksham8566
@saksham8566 6 лет назад
Very nicely explained! And not too hard English used 😋
@aniruddhsingh3501
@aniruddhsingh3501 2 года назад
sir love your videos...kindly consider including the algorithms along with the explanation
@zahid_9217
@zahid_9217 Год назад
I have done crazy amount of practice finally I understand it perfectly. keep doing practice you are going to master it.
@sergekamga915
@sergekamga915 3 года назад
Your explanations are super clear. Can you add videos about topological sort, strongly connected components, and bipartite graphs?
@ASHJACX
@ASHJACX 6 лет назад
it was a great explanation, you deserve million views
@harixhyadav
@harixhyadav 6 лет назад
whatsup bro
@jivanmainali1742
@jivanmainali1742 3 года назад
@@harixhyadav got placed??
@user-cr7ux1jt9u
@user-cr7ux1jt9u Месяц назад
the way u are teaching is excellent sir.please continue to make videoes
@rajivtechknow393
@rajivtechknow393 4 года назад
After learning from your video lecture I completed certified course very easily u are great🙏
@syedmahasibali2324
@syedmahasibali2324 5 лет назад
Made the problem easier well done Great privilege to see this
@Desireanshu
@Desireanshu 6 лет назад
Thank you sir for clearly explaining step by step
@fahmidhossainSakib
@fahmidhossainSakib 2 года назад
this guy is amazing ! teaching us with lots of care and effort.
@ajithnayak2754
@ajithnayak2754 4 года назад
@Abdul Bari Sir, your explanations are so amazing!!
@dan-gu1ty
@dan-gu1ty 5 лет назад
Abdul sir, you are the best ♥
@srikanthuppala8297
@srikanthuppala8297 5 лет назад
Great Sir. Clear explanation. Thank you so much Sir.
@saicharan8675
@saicharan8675 4 года назад
Really helping your videos alot professor.. Thank you
@ankoor
@ankoor 3 года назад
n-Queens Python: class Board(object): def __init__(self, n): self.n = n self.board = [[0 for _ in range(n)] for _ in range(n)] def solve(self, row, result, output): if row == self.n: output.append(result[:]) return for col in range(self.n): if self.isSafeCell(row, col): self.board[row][col] = 1 result.append((row, col)) self.solve(row+1, result, output) self.board[row][col] = 0 result.pop() def nQueens(self): result = [] output = [] self.solve(0, result, output) return output def isSafeCell(self, row, col): # Vertical check for r in range(row-1, -1, -1): if self.board[r][col]: return False # Main diagonal check r = row - 1 c = col - 1 while r >= 0 and c >= 0: if self.board[r][c]: return False r -= 1 c -= 1 # Minor diagonal check r = row - 1 c = col + 1 while r >= 0 and c < self.n: if self.board[r][c]: return False r -= 1 c += 1 return True def display(self): for row in self.board: print(row) b = Board(4) b.nQueens()
@dibyajyoti3038
@dibyajyoti3038 Год назад
Java!??
@minato7621
@minato7621 Год назад
@@dibyajyoti3038 python
@sufyaansaeed7158
@sufyaansaeed7158 5 лет назад
thank you so much for all your videos, major help!!
@user-wc1sm8cj8s
@user-wc1sm8cj8s 3 года назад
Very great explanation. Thanks sir, you earned my respect
@vigneshrao4965
@vigneshrao4965 2 года назад
Hi sir I saw the video of n queens problem ,it helped me lot to create my own presentation Now I am in need tug of war problem using backtracking
@mukitmahmudul2616
@mukitmahmudul2616 4 года назад
I love ur way of teaching sir.u makes the lesson easy.Love from bangladesh.
@magentata1942
@magentata1942 2 года назад
without your lectures we are wasted sir♥️♥️💯🔥
@ArujSiddiqui-fp7hv
@ArujSiddiqui-fp7hv 3 месяца назад
Tb tera career gya
@gayatrianiruddha1042
@gayatrianiruddha1042 4 года назад
Thank You for explaining it so well! :D
6 месяцев назад
Brilliant explanation. Thanks, Professor Abdul!
@yeet3810
@yeet3810 4 года назад
Thank you master you're the best explaning👍
@gayathriswaminathan6714
@gayathriswaminathan6714 6 лет назад
very good explanation. very helpful
@k-ananya9657
@k-ananya9657 2 года назад
Thank you sir! Really you are a great person, lots of love and respect
@nandanbanerji8309
@nandanbanerji8309 3 года назад
Really Great Prof. Bari. very nice demonstration.
@Angleito
@Angleito 6 лет назад
great video, you're a great speaker
@chamnil8666
@chamnil8666 3 года назад
Thank you sir .you are a great teacher.Great explanation.I am subscribed.
@kadirilavanyareddy6033
@kadirilavanyareddy6033 2 года назад
Thanks sir... U gave us THE BEST lecture
@vman049
@vman049 3 года назад
Note that the reason you're able to restrict the first queen to the first row, second queen to the second row, and so on is because they are all queens, so it doesn't matter which queen is on which row -- they will all function the same way. In other words, the ordering of the queens doesn't matter. You could just as well put queen 3 in row 4 and queen 4 in row 3 and achieve the same result. We are forcing there to be a single queen per row, since otherwise two queens would be under attack, and are just interested in specifying which _column_ the queen in each row will be on.
@soumyajitdatta9016
@soumyajitdatta9016 6 дней назад
Bro u just said something that will change the way earth revolves around the sun
@arunsammitpandey86
@arunsammitpandey86 4 года назад
Thank you sir for such great explanation!!
@jishnuprasadhemaraghunanda4384
Amazing sir Understood in a single go
@u-mimi
@u-mimi 5 лет назад
wow.. It's really fun. I'm not good at English but this lecture is easy to understand. I already know backgrounds, but it's very fun to me. now i'm conside buy ur other lecture.
@pinnumishra4563
@pinnumishra4563 3 месяца назад
What a great way of explanation. Thank you so much Sir G
@nafees-rehman
@nafees-rehman 5 лет назад
Thank you so much sir this concept is really easy but my sir can't explained in depth..
@mandilal94
@mandilal94 5 лет назад
Nice Explanation...Thank you sir
@josmyjoseph2178
@josmyjoseph2178 5 лет назад
Very Good Explanation. Very Helpfull
@supriyachauhan5341
@supriyachauhan5341 2 года назад
Don't know what I'd do without you!!
@Mr.Yadav1997
@Mr.Yadav1997 4 года назад
You are excellent teaching in DDA subject TQ sir
@chandud4255
@chandud4255 6 лет назад
Explanation is awesome but please add programmatic pseudo code also
@arkapravabhattacharya9472
@arkapravabhattacharya9472 5 лет назад
After the first arrangement of all the queens,shuffling of q3 was done and so was done for q4. As q4 was already in 4th column why you have written q3 in 4th column?
@glitchmaker0309
@glitchmaker0309 Месяц назад
This guy teaches a million times better than my gibbering algorithm teacher.
@udaynithin8161
@udaynithin8161 10 месяцев назад
sir we are back benchers so sorry for this meru explain chesey way ke okkati chpali sir me modda ke salam me gudha ke gulham hattsoff sir for passing out in this subject
@phdgateway4127
@phdgateway4127 5 лет назад
Dear Guru...! Its very great that you've explained well .but we as a learners we'd also expect it in Algorithm tracing .if you possible could you please make it out sir
@rhythmrockers6176
@rhythmrockers6176 6 лет назад
Sir, you are really great. Thanks sir
@lspophale
@lspophale 5 лет назад
superb explaination in simple words
@irajk6102
@irajk6102 5 лет назад
Excellent sir...Thank you very much...
@chandradeepika5892
@chandradeepika5892 6 лет назад
Thank you sir very nice explanation...
@abhinavdadhich2311
@abhinavdadhich2311 5 лет назад
god aur banao aaise log duniya mai itne clear minded
@Areeva2407
@Areeva2407 3 года назад
Very good tutorial. Very systematic
@aniketmishra9265
@aniketmishra9265 6 лет назад
So underrated. I'ma share.
@Shivam22.1.97
@Shivam22.1.97 6 лет назад
wonderful teacher u r ..........sir most of the student try to study cormen book of algo but failed to do so ......sir plz make videos of cormen book explanation .........it will be of grt help to many..........thanks
@srivalli9670
@srivalli9670 3 года назад
Loads of respect sir and thank you very much sir
@shasvatnayak2329
@shasvatnayak2329 3 года назад
You are an Inspiration sir✨
@patrickmayer9218
@patrickmayer9218 7 месяцев назад
*3 things to worry about so queens don't attack each other: same row, same column, and same diagonal *generate a state-space tree *the default is that the nth queen is in the nth column and nth row (they form a diagonal on the board from left to right) the state-tree backtracking starts at 8:40 Thanks for the video!
@rajeshgandikota9856
@rajeshgandikota9856 6 лет назад
well explained......thank u sir jii
@KovalovAnton
@KovalovAnton 5 лет назад
Like -> Watch -> Practice -> Repeat
@Levinsam
@Levinsam 5 лет назад
Such a great way of explaining the QueensProblem ... Thanks a lot!
@naveenkothamasu
@naveenkothamasu 6 лет назад
Thank you, great explanation!!
@veenuupanchal5854
@veenuupanchal5854 4 года назад
You are a great teacher.
@silmendor
@silmendor 3 года назад
Great explained, thank you
@rajingajadhar4135
@rajingajadhar4135 6 месяцев назад
First year here, this was extremely helpful!
@mayurpatil6723
@mayurpatil6723 5 лет назад
Great explanation!
@sshiv908
@sshiv908 5 лет назад
my favorite teacher on utube
@gaius_marius
@gaius_marius Год назад
Excellent explanation. Thank you.
@prayagshah1247
@prayagshah1247 5 лет назад
Thank you very much sir I have clear this subject in just two days before exams👦
@nishawandile3097
@nishawandile3097 Год назад
Thank you very much sir for so easy explaination.
@dr.vinodkumarchauhan3454
@dr.vinodkumarchauhan3454 6 лет назад
Sir, I suggest you to make comments about the complexity and algorithm/program for each problem, in that way it will present complete discussion about a problem otherwise students need to search other content for getting answers to these questions. Thanks!
@user-vm1lw5xm9z
@user-vm1lw5xm9z 5 лет назад
Thank you for a great explanation in a short time.
@Momo-qr3rd
@Momo-qr3rd 2 года назад
You are the best teacher sir
@shreyoshiraychaudhary8808
@shreyoshiraychaudhary8808 4 года назад
Sir, can you please show the steps to find the time complexity using the recurrence relation T(n) = nT(n-1) + n^2
@Sanatanabhishekaa28498
@Sanatanabhishekaa28498 6 лет назад
Nice Explanation 😊😊👌
@viky293
@viky293 2 года назад
Many Good things are free and under appreciated.
@kajolyadav890
@kajolyadav890 5 лет назад
Love your videos sir😊
@Ashik-iu1oh
@Ashik-iu1oh 3 года назад
Thanku sir you are doing a great work ❤️😍💕
@shraboniroy8098
@shraboniroy8098 5 лет назад
Great explanation.. Please could you also add the pseudo code and explain it
@manojjeswani9061
@manojjeswani9061 6 лет назад
very nice explanation sir
Далее
6.2 Sum Of Subsets Problem - Backtracking
12:19
Просмотров 1,3 млн
6.3 Graph Coloring Problem - Backtracking
15:52
Просмотров 1,1 млн
TYLA DANCE TREND😭 | #shorts #emilydobson
00:12
Просмотров 2,6 млн
7.3 Traveling Salesman Problem - Branch and Bound
24:42
N-Queens - Backtracking - Leetcode 51 - Python
17:51
Просмотров 149 тыс.
String Theorists Have Calculated the Value of Pi
7:10
Просмотров 118 тыс.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
6.4 Hamiltonian Cycle - Backtracking
18:35
Просмотров 978 тыс.
L14. N-Queens | Leetcode Hard | Backtracking
36:55
Просмотров 359 тыс.