This feels more like watching a leetcode solution video. I'm not really getting what the logic and understanding of how to go about backtracking problems is. I don't know if I'm the only one, but it seems there needs to be some prior knowledge of backtracking algorithms to follow this video.
@Siraj Haq By state she meant the position of the queens in the chessboard. She represented state in her code using a list where each element in the list is a queen; the position/index of each element in the list represents the row that the queen is placed in, and the value of the element is the column the queen is placed in. So, [2,0,1,3] would mean the 1st queen is placed in row = 0 column = 2, the 2nd queen is placed in row =1 column = 0 and so on.
@Siraj Haq Yes, you want to think of the state like a snapshot of the chessboard which gets updated with each recursive call. Representing state in a 1 dimensional size array would be the most efficient way to solve the problem since it reduces the search space for the correct positions of the queens by N. However, this is not the only way to store state. You can very well use a 2D array to store both row and columns but that would mean you increase the search space to N^2. To answer your final question, backtracking problems are simply a way of correcting or updating your result and it's done using the function call stack to remember previous choices and then update information. Every solution to a problem has its own unique pattern that one can make use of to solve it. Utilizing an array of size N to represent state is just a pattern specific to this problem. However using backtracking is something more fundamental.
All I understood from the video is She works at salesforce and she graduated from university of Chicago. These will help me to solve any backtracking problem in the interview..
Excellent video. This was really helpful. However, because this was an introduction to backtracking, it would have been much better to have started with a relatively simpler problem like generate subsets, or generate permutations.
Well, that was weird. The code submitted for the N-Queens problem had clear errors in it, i.e. the return statement that would only return the first solution found (instead of collecting all solutions, as the question asks us to do) as well as an incorrect function call in state_to_string (missing 'n' parameter). It seemed this must have failed, the code was fixed and resubmitted, but this was edited out. I don't like that. That's quite sneaky. Beyond that, like others have said, this video underdelivers in terms of promising more of a strategy-based generic implementational plan. It's just function templates and 30 mins of watching a coding solution instead. The logic for why you only need to discard solutions on the diagonals for the adjacent row in the N-Queens problem and lots of other important details are just not explained.
True about the "state_to_string", but the return statement exits only one recursive stack call (it is kind of redundant as it would anyway happen due to lack of candidates), all solutions should be still there
In terms of 3:51, the state is not "invalid" as mentioned right? It' just the case that it is not optimised, but it still satisfies the "valid" state of no queen being capable of attacking another?
at some points she has just written the line of code without explaining the reason why. not at all a beginner friendly video. just writing the code is not enough, the concept behind the design is important, which she did not share at all.
Very true, i came here seeing the backtracking title of video, i thought she would teach us how to approach to backtracking problems but videos turns out to be an explanation to Queens Problem and Sudoku Problem.
This video doesn't explain backtracking and what is that at all. so it's not a "Crash Course". I am new to backtracking and it losted me halfway by just telling us to follow the template coding. Here is a good video I found which I understand well after I watched this ua-cam.com/video/H232aocj7bQ/v-deo.html.
It's a class instance function. In python "self" is what Java and other languages would call "this" -- think of it as a pointer or reference to the current instance of the class.
freecodecamp do a video on 1. UML&design patterns 2. compiler design 3. Management and organizational behavior 4. Distributed systems 5. computer graphics etc..............
I have traded with a lot of individuals but i have never come across anyone as good as Mrs Cynthia Solomo , just by appling her strategies i now trade independently. she is the best i advice any novice in investing to trade with her.
This feels more like watching a leetcode solution video. I'm not really getting what the logic and understanding of how to go about backtracking problems is. I don't know if I'm the only one, but it seems there needs to be some prior knowledge of backtracking algorithms to follow this video.
Recursion is the foundation for backtracking. If you have any flaws in understanding recursion, I would start there.
@Siraj Haq By state she meant the position of the queens in the chessboard. She represented state in her code using a list where each element in the list is a queen; the position/index of each element in the list represents the row that the queen is placed in, and the value of the element is the column the queen is placed in. So,
[2,0,1,3] would mean the 1st queen is placed in row = 0 column = 2, the 2nd queen is placed in row =1 column = 0 and so on.
@Siraj Haq Yes, you want to think of the state like a snapshot of the chessboard which gets updated with each recursive call. Representing state in a 1 dimensional size array would be the most efficient way to solve the problem since it reduces the search space for the correct positions of the queens by N. However, this is not the only way to store state. You can very well use a 2D array to store both row and columns but that would mean you increase the search space to N^2. To answer your final question, backtracking problems are simply a way of correcting or updating your result and it's done using the function call stack to remember previous choices and then update information. Every solution to a problem has its own unique pattern that one can make use of to solve it. Utilizing an array of size N to represent state is just a pattern specific to this problem. However using backtracking is something more fundamental.
Same
All I understood from the video is She works at salesforce and she graduated from university of Chicago. These will help me to solve any backtracking problem in the interview..
She explained it well but I think you need more practice to understand such stuff
im just starting to watch, scrolled down , this comment made me LOL.
😅
Excellent video. This was really helpful. However, because this was an introduction to backtracking, it would have been much better to have started with a relatively simpler problem like generate subsets, or generate permutations.
Great video it’s refreshing as I almost forgot the examples of backtracking algorithms
Does this mean it's rarely used in your job?
@@Allyourneedsmet i guess
Well, that was weird. The code submitted for the N-Queens problem had clear errors in it, i.e. the return statement that would only return the first solution found (instead of collecting all solutions, as the question asks us to do) as well as an incorrect function call in state_to_string (missing 'n' parameter). It seemed this must have failed, the code was fixed and resubmitted, but this was edited out. I don't like that. That's quite sneaky.
Beyond that, like others have said, this video underdelivers in terms of promising more of a strategy-based generic implementational plan. It's just function templates and 30 mins of watching a coding solution instead. The logic for why you only need to discard solutions on the diagonals for the adjacent row in the N-Queens problem and lots of other important details are just not explained.
True about the "state_to_string", but the return statement exits only one recursive stack call (it is kind of redundant as it would anyway happen due to lack of candidates), all solutions should be still there
I believe using graphs to visualize backtracking is the best approach, with practice we can settle on the template of code.
Keep going, your are amazing 😍😍
Almighty God !! Protect this channel at all costs ❤
Donating would also help after God.
This was fantastic! I love this general approach to solving backtracking problems. This has been very insightful. Thank you!
Thanks , can u upload a more comprehensive video on backtracking?
In terms of 3:51, the state is not "invalid" as mentioned right? It' just the case that it is not optimised, but it still satisfies the "valid" state of no queen being capable of attacking another?
It's invalid as you need to place 4 queens, but once you place the third there will be no valid spaces left.
Great video and important concept to learn that was well explained; well done.
at some points she has just written the line of code without explaining the reason why. not at all a beginner friendly video. just writing the code is not enough, the concept behind the design is important, which she did not share at all.
Very true, i came here seeing the backtracking title of video, i thought she would teach us how to approach to backtracking problems but videos turns out to be an explanation to Queens Problem and Sudoku Problem.
Frankly, just amazing!! Thanks a lot.
Damn! the clean explication to resolve the problem that's insane. I would gladly have that kind of code in my work
Wow, this is a fantastic walkthrough
Java version for N-Queens problem: tinyurl.com/6244hpvc
If I needed to learn one of the courses you teach for a remote job. Which course is most sought after by employers and I can learn here. 🙏🏻
@Pinned.by. TechLead my phone won’t let me initiate on WhatsApp. You have to invite me. It’s wonky.
@@thedingo8833 thats a bot trying to scam you. Please learn more about internet literacy.
@@vali69 thank you. I will. 😅💦
Screw these University exams , i can't wait to code again 🔥
Thak you Lynn. OUtstanding presentation and code.
Thanks!
all your videos are gold..
This is great 👏 waiting for more learson
Why does this crash course start with a difficult backtracking problem instead of building up to it with progressive exercises?
Excellent. Thank you 🕊😌
Great video. You just gained a subscriber
Always wanted this
Is there a Javascript equivalent of these methods please?
This video doesn't explain backtracking and what is that at all. so it's not a "Crash Course". I am new to backtracking and it losted me halfway by just telling us to follow the template coding. Here is a good video I found which I understand well after I watched this ua-cam.com/video/H232aocj7bQ/v-deo.html.
Best coding video ever
Well-explained. You are the best.
Well done
Please more such videos!!
love!!!
Avengers "PROTECT THIS CHANNEL".
¡Gracias!
Light theme, god help me my eyes ahhhhh....
Yo FCC please upload a UE4 blueprints tutorial
Great I have exam in approximately 3hrs
good leetcode video but doesnt really give a solid foundation on backtracking if the person is a beginner.
Thanks ❤️
A video on hashing in java please ....!!!!!!!!!!!!!
Yaay
Nice template, but the code got so large and confusing lol
12:27 line 21. what is that syntax ? someone plz tell me.
It's a class instance function. In python "self" is what Java and other languages would call "this" -- think of it as a pointer or reference to the current instance of the class.
@@robbyoconnor yes. i know about self in python. but i meant the syntax was "function name -> something".
what does that arrow do ?
@@ankanbasu7381 it's new to Python 3 for type-safety.
@@robbyoconnor okk. thanks for your explanation !
nothing about backtracking concept, just leetcode solution...
Useless
Jones Charles Allen Elizabeth Wilson Timothy
My theory: for every n x n board, a maximum of n queens(chess) can be put on it without any of them in each other’s way.
2x2 … ?
@@therealjustincase checkmate 😂
Can you do it in 2x2 and 3x3? :)
@@Manman-sw7vc I guess it should be for n > 3.
Tbh this was a long time ago and I can't remember my thought process lol
Taylor Anna Rodriguez Jason Martin Steven
Her lips movements are not real, this is a.i.
freecodecamp do a video on
1. UML&design patterns
2. compiler design
3. Management and organizational behavior
4. Distributed systems
5. computer graphics etc..............
Gonzalez Kimberly Brown Amy Davis Michael
Got past over head .... Hate chess
Sorry but its boring
Can I get Lynn's IG plz..
Damn, it feels like a tiktok voice would have read the script better.
Seems like watching leetcode solution directly..
Is she a robot
python should be banned from this planet
这个小姐姐是中国人吗
🙏👍
ارجوك الترجمة العربية ارجوك
You need first to explain it on a white board
1st view
This is not the first time i am hearing of Mrs Cynthia Solomo and her amazing trading skills but i have no idea how to get her
Wow, amazing to see others who trade with Mrs Cynthia Solomo. I'm currently on my 5th trade with her and her portfolio has grown tremendously
first
I have traded with a lot of individuals but i have never come across anyone as good as Mrs Cynthia Solomo , just by appling her strategies i now trade independently. she is the best i advice any novice in investing to trade with her.
ROFL!! even here?
Why is it that women who code are soooooooo attractive?
Please don't be a creep, yikes
@@revesbystation8630 hahaha 'kay.
Clearly FCC.org reads my mind. Its 3rd time they uploaded a video thats in mind or about to do but donno how.
Thanks!