def add(item, weight)
      delta = Integer(weight)
      if delta > 0
        new_weight = @total_weight + delta
        weights[@total_weight...new_weight] = item
        @total_weight = new_weight
      end
    end
def add(item, weight)
      delta = Integer(weight)
      if delta > 0
        new_weight = @total_weight + delta
        weights[@total_weight...new_weight] = item
        @total_weight = new_weight
      end
    end
Sets initial weights

 Accepts Hash as an argument, where keys are items and corresponding values
 are their weights (positive integers).

 @param [Hash] weights
 Add item with weight

 @param [Object] item
 @param [Integer] weight