• + 0 comments

    **** C# public static List BreakRecords(List scores) { List recordcounts = new List() { 0, 0 };

      int highestInd = 0;
      int lowestInd = 1;
      int lowestRecord = scores[0];
      int highestRecord = scores[0];
      foreach (int record in scores)
      {
          if (record < lowestRecord)
          {
              recordcounts[lowestInd]++;
              lowestRecord = record;
          }
          else if (record > highestRecord)
          {
              recordcounts[highestInd]++;
              highestRecord = record;
          }
      }
    
      return recordcounts;
    

    }