Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 926 Bytes

Question.md

File metadata and controls

26 lines (18 loc) · 926 Bytes

Question: Medal Assignment Challenge

Difficulty Level: 🟢 Beginner
Domain: Programming Languages (Any Language)

Description: Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal", and "Bronze Medal".

Input Example:

scores = [5, 4, 3, 2, 1]

Output Example:

["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"]

Instructions:

  1. Implement a function that processes the input list of scores.
  2. Return a list of strings representing the ranks of the athletes. The top three athletes should receive the medals as specified, and the others should be represented by their rank as a string.
  3. Your solution can be implemented in any programming language.
  4. Ensure to include comments in your code explaining your approach.