About 48,700 results
Open links in new tab
  1. Greedy algorithm - Wikipedia

    Kruskal's algorithm and Prim's algorithm are greedy algorithms for constructing minimum spanning trees of a given connected graph. They always find an optimal solution, which may not be unique in general.

  2. Greedy Algorithms Tutorial - GeeksforGeeks

    Jan 22, 2026 · Greedy algorithms are a class of algorithms that make locally optimal choices at each step with the hope of finding a global optimum solution. At every step of the algorithm, we make a …

  3. What is a Greedy Algorithm? Examples of Greedy Algorithms

    May 12, 2023 · In computer science, a greedy algorithm is an algorithm that finds a solution to problems in the shortest time possible. It picks the path that seems optimal at the moment without regard for …

  4. Greedy Algorithms: Concept, Examples, and Applications

    First, let’s understand what a greedy algorithm is. A greedy algorithm is an optimization technique that solves problems step by step, always selecting the best possible choice at each moment.

  5. DSA Greedy Algorithms - W3Schools

    Two properties must be true for a problem for a greedy algorithm to work: Greedy Choice Property: Means that the problem is so that the solution (the global optimum) can be reached by making …

  6. Greedy Algorithms Explained: A Beginner’s Guide with Examples

    Aug 16, 2025 · Learn how greedy algorithms work and when to use them, and see real-world examples with simple explanations. 🤑 What is Greedy in Algorithms? The word “Greedy” itself gives the …

  7. We now have a simple greedy algorithm for routing the frog home: jump as far forward as possible at each step. The algorithm will find a legal series of jumps (i.e. it doesn't “get stuck”). The algorithm …

  8. Greedy algorithm - Art of Problem Solving

    In mathematics and computer science, a greedy algorithm is one that selects for the maximal immediate benefit, without regard for how this selection affects future choices. As with all algorithms, greedy …

  9. Greedy Algorithm - Programiz

    To begin with, the solution set (containing answers) is empty. At each step, an item is added to the solution set until a solution is reached. If the solution set is feasible, the current item is kept. Else, the …

  10. Greedy Algorithms | Brilliant Math & Science Wiki

    To make a greedy algorithm, identify an optimal substructure or subproblem in the problem. Then, determine what the solution will include (for example, the largest sum, the shortest path, etc.). Create …