Hi, I'm Michael Levin and together we will study Greedy Algorithms. They are some of the simplest algorithms that exist and they usually seem a pretty natural way to try solving a problem. We will start with a few examples of problems that can be solved by greedy algorithms, just to illustrate how they work. And our very first problem is a problem about largest number. And for this problem, you will probably be able to come up with a greedy algorithm yourself, because that is really a very natural thing to do. So imagine this situation. You are trying to get a job at a company and you already had a few interviews, and everything went well. Now you have your final interview with the boss, and he tells you that he will give you an offer. But instead of negotiating your salary with you, he will give you a few pieces of paper with digits written on them. And your task will be to arrange those digits in a row, so that when you read the number from left to right, that will be your salary. So basically, you have a problem. Given a few digits, to arrange them in the largest possible number. And there are a few examples of such numbers on the slide. So what do you think will be the correct answer to this problem? And of course, the correct answer is 997531. And it's pretty obvious that you should arrange numbers from the largest to the smallest, from left to right. But let's look at how the greedy algorithm does that. So, the Greedy Strategy is start with a list of digits then find the maximum digit in the list. Append it to the number and remove it from the list. And then repeat this process until there are no digits left in the list. So on the next step we will find the largest digit, which is again 9. We'll append it to the number to the right and remove it from the list. Then we will find 7 as the largest digit appended to the right and remove it from the list. And then we'll continue with 5, 3, and 1. And then we get the correct answer, 997531. And in the next video, we will design an algorithm to find the minimum number of refuels during a long journey by car. We will see similarities between these two problems, largest number problem and car refueling problem. And we will define how greedy algorithms work in general.