public Polynomials(String str){
        polynomial = new ArrayList<>();
        Scanner scan = new Scanner(str);
        for(Term t = Term.scanTerm(scan); t != null; t = Term.scanTerm(scan))
            polynomial.add(t);
        quickSortPolynomial(0, polynomial.size() - 1);
    }