Algorithm to assign students to optimal sections based on students' preferences.