Greedalgoritmusok
Greedalgoritmusok, or greedy algorithms, are a class of algorithms that make locally optimal choices at each stage with the hope of finding a global optimum. They are often used for optimization problems. The core idea is to select the best possible option at the current step without considering future consequences. This approach doesn't guarantee the absolute best solution for all problems, but it often provides a good approximation and is simpler and faster to implement than algorithms that explore all possibilities.
A key characteristic of greedy algorithms is that once a choice is made, it is never undone.
Examples of problems where greedy algorithms are effective include Dijkstra's algorithm for finding the shortest path