Breaking the Records

  • + 0 comments
    def breakingRecords(scores):
        low = scores[0]
        high = scores[0]
        breaks = [0,0]
        
        for score in scores:
            if score < low:
                low = score
                breaks[1]+=1
            if score > high:
                high = score
                breaks[0]+=1
        
        return breaks