What is the difference between RANK and DENSE_RANK?
Asked in the Conceptual questions stage. Implement both ranking rules for a list of integer scores, ordered from highest to lowest.
Given scores, return a dictionary with rank and dense_rank arrays. Equal scores receive equal positions. RANK leaves gaps after ties, while DENSE_RANK does not.
def rank_scores(scores):