Question
Each server in a fleet reports its current CPU load as an integer. Write a function that returns the k highest load values in descending order, so a dashboard can show the busiest machines first. If k is larger than the number of servers, return every load in descending order; if k is zero or the list is empty, return an empty list. Duplicate loads may appear and each report counts separately. Example: loads = [62, 95, 40, 73], k = 2 gives [95, 73].
top_server_loads(loads: list[int], k: int) → list[int][[62,95,40,73],2]out[95,73]State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.