Join Patrick Royal for an in-depth discussion in this video My solution: Brute force vs. heuristic methods, part of Code Clinic: Java.
- For this solution I don't use a brute force approach…like placing the queens in every possible position…on the chess board and check if it is valid,…but I don't exactly use heuristics either.…A heuristic is defined as a solution technique…based on experience, intuition…or understanding of the structure of the problem.…It tends to be faster than ordinary solutions,…but it is also not guaranteed to give the correct answer,…and in some cases it may not even be able to give an answer.…For complicated problems this trade off may be worth it,…but you have to be careful to either…include some way to check your solution,…or be prepared to accept in an answer that may be sub-optimal.…
The techniques I use to save time on this solution…are not heuristics because they…are still guaranteed to give the correct answer.…Every eight queen solution must have…exactly one queen on every row, column and diagonal.…So if I get to a point where there are no possible placements…for a queen on column four, there's no need…to check columns five through eight,…
Patrick introduces challenges and provide an overview of his solutions in Java. Challenges include topics such as statistical analysis, searching directories for images, and accessing peripheral devices.
Visit other courses in the series to see how to solve the exact same challenges in languages like C#, C++, PHP, Python, and Ruby.
Skill Level Intermediate
Q: I am unable to access the Lake Pend Oreille data from outside the U.S.
A: A static copy of this data is provided here for lynda.com members outside of the U.S
Problem One: Exploring Lake Pend Oreille
Problem Two: Image Analysis
Problem Three: Eight Queens
Problem Four: Accessing Peripherals
Problem Five: Recursion and Directories
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.