Company: Tech Mahindra_6oct
Difficulty: medium
Optimal Student Book Assignment Problem Description In a school, there is a small library with N number of students as its members. All members have a unique student ID. The library has a certain number of books on M different subjects. Each student has been given an assignment and to complete it the students are using different books from the library to help them. The library has already issued some books to its members before this. The students can still borrow the required number of books from the library to complete their respective assignments. Each student returns the book issued to them after completing their assignment. Only when the books have been returned to the library then only another student can borrow that book. Also, while assigning books the library starts assigning books to the student with the smallest student ID and proceeds to the student with the higher student ID. Once the library gets to the student with the largest student ID then it goes back to the smallest