Sort by

recency

|

2219 Discussions

|

  • + 0 comments

    In C# 100%

    public static List<int> breakingRecords(List<int> scores)
        {
            int bestBreaks = 0;
            int worstBreaks = 0;
    
            int maxScore = scores[0];
            int minScore = scores[0];
            
            for (int i = 1; i < scores.Count; i++)
            {
                if (scores[i] > maxScore)
                {
                    maxScore = scores[i];
                    bestBreaks++; 
                }
    
                if (scores[i] < minScore)
                {
                    minScore = scores[i]; 
                    worstBreaks++; 
                }
            }
            
            return new List<int> { bestBreaks, worstBreaks };
        }
    
  • + 0 comments

    Breaking the records of endlress entertainment for arab audience with the original egybest apk. Its perfect to spend your leisure time with some pleasure.

  • + 0 comments

    Solution using JavaScript:

    function breakingRecords(scores) { let maxCount = 0; let minCount = 0; let highScore = scores[0]; let lowScore = scores[0];

    for(let i = 1; i < scores.length; i++) {
        if(scores[i] > highScore) {
            maxCount = maxCount + 1;
            highScore = scores[i];
        } 
        if(scores[i] < lowScore) {
            minCount = minCount + 1;
            lowScore = scores[i];
        }
    }
    return [maxCount, minCount];
    

    }

    let scores1 = [3, 4, 21, 36, 10, 28, 35, 5, 24, 42]; console.log(breakingRecords(scores1));

  • + 0 comments

    Logo branded products breaking the records of brand visibility! Custom items like T-shirts, bags, and water bottles help keep your logo in sight, reaching more potential customers. Perfect for corporate giveaways, events, and promotional campaigns, these products create lasting impressions. Stand out from the competition with high-quality, practical merchandise that promotes your brand everywhere. Boost engagement and build recognition effortlessly with logo-branded products that keep your brand at the forefront!

  • + 0 comments

    Here my java code :

    public static List breakingRecords(List scores) { if (scores.isEmpty() || scores.size() == 1) { return Arrays.asList(new Integer[]{0, 0}); } Integer max = scores.get(0); Integer min = scores.get(0); Integer highestScore = 0; Integer lowestScore = 0; for (int i = 1; i < scores.size(); i++) { if (max < scores.get(i)) { max = scores.get(i); highestScore++; } if (min > scores.get(i)) { min = scores.get(i); lowestScore++; } } return Arrays.asList(new Integer[]{highestScore, lowestScore}); }