• + 0 comments

    Python 3

    def breakingRecords(scores):
        hs = scores[0]
        ls = scores[0]
        hsb = 0
        lsb = 0
        for each in scores[1:]:
            if each>hs:
                hs = each
                hsb+=1
            elif each<ls:
                ls = each
                lsb+=1
            else: pass
        return [hsb, lsb]