We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
//Define the structs Workshops and Available_Workshops.
//Implement the functions initialize and CalculateMaxWorkshops
struct Workshop
{
int start_time;
int duration;
int end_time;
};
Attending Workshops
You are viewing a single comment's thread. Return to all comments →
//Define the structs Workshops and Available_Workshops. //Implement the functions initialize and CalculateMaxWorkshops struct Workshop { int start_time; int duration; int end_time; };
bool operator<(const Workshop & lhs, const Workshop & rhs) { return (lhs.end_time < rhs.end_time); }
struct Available_Workshops { std::vector arr; int n; };
Available_Workshops *initialize(int start_time[], int duration[], int n) { Available_Workshops *obj;
}
int CalculateMaxWorkshops(Available_Workshops *ptr) { int curr_end; int max;
}