Join Dan Gookin for an in-depth discussion in this video Creating a two-dimensional array solution, part of Code Clinic: C.
- Despite success with the N-Queens code,…I wanted to try it again.…Specifically, I wanted to work on the recursive routine…to ensure that I fully understood the diagonal attack.…Because my stumbling block was the single-dimension array,…I figured I would return back to…a two-dimensional character array.…Unlike my first disastrous attempt to solve this problem,…I would track only the queen's location,…and not her attack vectors.…So, this third solution was really a combination…of both my previous attempts.…With the emphasis on making a diagonal attack…easier for me to code.…
Two-dimensional character array is faked right here,…at line 62.…I use a pointer instead of two-dimensional array notation…simply because this is the C-language,…and pointers are a big deal.…Of course, that also requires some pointer math,…but for some reason,…my brain could handle that type of math…better than the row-column thing…going on with the single-dimension integer array,…as covered in the previous movie.…Space is allocated for the array.…
Dan introduces challenges and then provides an overview of his solutions in C. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Skill Level Beginner
1. Problem One: Exploring Lake Pend Oreille
2. Problem Two: Image Analysis
3. Problem Three: Eight Queens
4. Problem Four: Accessing Peripherals
5. Problem Five: Recursion and Directories
6. Problem Six: Building the Web
- 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.