Breaking the Records

  • + 0 comments

    Python Solution:

    def breakingRecords(scores): # Write your code here min_count = 0 max_count = 0 min_score = scores[0] max_score = scores[0]

    for score in scores:
        if min_score < score:
            min_score = score
            min_count += 1
        elif max_score > score:
            max_score = score
            max_count += 1
    
    return [min_count, max_count]