Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Can we sort the arrays to help solve the problem?
Can we greedily match each student to a seat?
The smallest positioned student will go to the smallest positioned chair, and then the next smallest positioned student will go to the next smallest positioned chair, and so on.