This is more of mathematical question than an algorithmic one; nevertheless it will be implemented in php.
I have an array of N tasks. Each task has taken t time to complete(e.g. task 1 has taken 5 hours to complete.) Now, in order to review that these tasks were completed correctly, I have to assign a certain number of users U to review each of them. Each user will be assigned a certain number of tasks, ideally, with each user having roughly the same amount of hours assigned as the other.
E.G. There are 10 tasks. task 1 took 4 hours, task 2 took 18 hours, task 3 took 6 hours...etc... totaling 80 hours.
There are 8 users. If each of the 8 users is to ideally have the same amount of hours (some users get more, yet less lengthier tasks, some users get less, yet lengthier tasks), what is a good way to automatically sort assign the tasks?