• + 0 comments

    Difference(vectorelements){ this->elements = elements; }

    void computeDifference(){
        sort(elements.begin(),elements.end());
        this->maximumDifference = 
            abs(elements[elements.size()-1]-elements[0]);
    }