You are given a list of (student_id, score) records. Return, for each student, their highest three scores in descending order. First, describe and implement a general approach without assuming special constraints. Then optimize your method if scores are guaranteed to be integers in the range 0–100. Discuss time and space complexity, how to handle ties, and what to do when a student has fewer than three scores.