January 2018
Intermediate to advanced
332 pages
7h 36m
English
A greedy algorithm is one in which a problem is broken down into smaller sub-problems and a solution to each of these sub-problems is pieced together based on a locally optimized choice at each step. This means that, in case of weighted edge graphs, for example, the next node is picked on the basis of whatever provides the least cost to travel from the current node. This may not be the best path to take, but, in the case of greedy algorithms, getting a solution is the main goal rather than getting the perfect or the ideal solution.
In this use case, we have a set of cities along with the weight associated with traveling to each of these cities (cost to travel/stay + enjoyment factor and ...
Read now
Unlock full access