Activity Selection | Greedy | C++ Solution
Activity Selection, is a Greedy related problem and in this post we will see how we can solve this challenge in C++
Given two vectors representing the start and finish time of activities. Find the maximum number of activities that can be performed by a person Only one activity can be done at a particular time Sort the activities by their finishing time then select the activities one by one and check if its start time is greater than equal to the finishing time of previous activity or not if yes then include that activity else proceed for the next one
Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @susantabiswas