Sort by

recency

|

2232 Discussions

|

  • + 0 comments

    Python

    def breakingRecords(scores): # Write your code here mi = ma = scores[0] mas=mis=0 for i in scores: if i > ma: ma = i mas+=1 if i < mi: mi = i mis+=1 return [mas,mis]

  • + 0 comments

    solucion:

    const scoreHigh =[];

    const scorelow = [];

    let comparador = scores[0]; let comparadorlow = scores[0];

    for (let index = 1; index < scores.length; index++) { const element = scores[index];

    if ( element > comparador) {
    
           scoreHigh.push(element);
    
           comparador = element;
    
    
    
    } else if (element < comparadorlow ) {
    
    
        scorelow.push(element);
        comparadorlow = element;
    
    }
    

    };

    return [scoreHigh.length, scorelow.length]

  • + 0 comments

    Breaking the Records is all about going beyond limits and setting new standards with bold style. When you throw on the skull belt, you're not just making a statement — you're claiming your space with serious attitude. This isn’t just about fashion, it’s about that raw edge that turns heads without trying too hard. Whether you're pairing it with jeans or layering it up for a night out, the skull belt adds that fearless touch. It’s got that gritty, no-rules vibe that fits right in with anyone breaking away from the usual. Style doesn’t have to shout to be loud — and that’s what this belt nails perfectly. Breaking the Records starts with what you wear, and this piece seals the deal.

  • + 0 comments
    def breakingRecords(scores):
        # Write your code here
        highest_score = None
        lowest_score = None
        high_count = 0
        low_count = 0
        
        
        for i in range(len(scores)):
            if highest_score is None and lowest_score is None:
                highest_score = scores[i]
                lowest_score = scores[i]
                continue
                
            if scores[i] > highest_score:
                highest_score = scores[i]
                high_count += 1
            elif scores[i] < lowest_score:
                lowest_score = scores[i]
                low_count += 1
                
        return high_count, low_count
    
  • + 0 comments

    I am trying to solve it using c

    int* breakingRecords(int scores_count, int* scores, int* result_count) {
     int min=scores[0], max=scores[0],min_count=0,max_count=0;
     for (int i=0; i<scores_count; i++) {
        if (scores[i]<min) {
            min=scores[i];
            min_count++;
        }
        else if (scores[i]>max) {
            max=scores[i];
            max_count++;
        }
     }
     result_count[1]=min_count;
     result_count[0]=max_count;
     return result_count;
    }
    

    ` my output contains min_count max_count 0 another garbege value it should contain only the first two value instead it have 4 values HELP