- Introduction
- Activity selection problem
- Fractional knapsack problem
- Job sequencing problem
- Huffman coding
What is activity selection problem? Ans. Fractional knapsack can be solved using greedy approach, 0-1 knapsack can not be solved using Greedy.
- activities are given with their start and end time
- select maximum activities that can be performed by a single person
- a person can work on a single activity at a time
- https://www.geeksforgeeks.org/activity-selection-problem-greedy-algo-1/
- debug n see each step
- create a priority queue, min heap