316 B
316 B
Sequences (#4)
Implement the School
extension function favoriteInstructor()
. It takes
Student
as a parameter and finds an instructor whose classes this student
takes more often. If there are several such instructors, the first one is
returned. If a student hasn't taken any classes yet, it returns null
.