A theme park has hired you to write an algorithm to help sch…

A theme park has hired you to write an algorithm to help schedule groups to ride roller coasters. You are provided an array with elements where is the number of people in group . You are also given an array with elements where is the number of seats on the th roller coaster. Finally, each roller coaster can be ridden at most times, and a group can only ride roller coaster if it is large enough to fit the group, i.e.,