Learn how to modify the recursive code to gather all discovered solutions into a collection.
- [Instructor] Now I don't know about you,…but I need to see these solutions.…So for me in particular, as I'm using the debugger,…as I'm stepping through code, I'm looking at…all these locals, autos and watch windows*…to see the variables actually change over time.…Well there's nothing quite like a collection…in which you've stored them, so you can go…and count them after the fact.…And so that's what's happening in the next test.…So I'll clear the break point here from line 49.…I'll come back down here, where it says…on line 59, IsTruesolutions.count = 92.…
So the theory and documentation on the internet…tells me there's 92 solutions.…OK, great.…So if I call PlaceQueens like I did before,…well it was just telling me true or false.…So let's go and build a second version of the same method…to do exactly the same task, but this time,…keep track of all of the solutions they find,…and so that as we obtain a successful outcome…on the right hand edge of the board,…let's store what we find and see if we actually…end up with 92 in total.…
Skill Level Intermediate
1. Problem 1: Pond Oreille
2. Problem 2: Where Am I?
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Facial Recognition
6. Problem 6: Real-Time Information Dashboard
Next steps2m 46s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.