If I go by train or aeroplane then only, I can cover this distance within 12 hrs. There is a constraint in the journey that we have to travel this journey within 12 hrs. We can go from A to B by walk, car, bike, train, aeroplane, etc. There are various solutions to go from A to B. The problem is that we have to travel this journey from A to B. I want to travel from A to B shown as below: ![]() If the solution is feasible, then we perform the union. Inside the for loop, we select the element one by one and checks whether the solution is feasible or not. We pass the array and number of elements in the greedy algorithm. Initially, the solution is assigned with zero value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |