Class Ranges

java.lang.Object
range.exercise.Ranges

public class Ranges extends Object
Author:
__STUDENT_NAME__, Dennis Cosgrove
  • Constructor Details

    • Ranges

      public Ranges()
  • Method Details

    • slice

      public static Range[] slice(int min, int maxExclusive, int numRanges)
      Creates an array of Range objects of length numRanges. Each slice in the returned result should be allocated a balanced amount of the range. Any remaining data should be distributed one each to the front slices.
      Parameters:
      min - minimum (inclusive) of the range to slice
      maxExclusive - maximum (exclusive) of the range to slice
      numRanges - the number of ranges to divide [minInclusive, maxExclusive) into
      Returns:
      the created array of ranges