public static void main(String[] args) {
        List<Double> numbers = new ArrayList<>();

        int size = 300;
        for (int i = 1; i <= size; i++) {
            numbers.add((double)i);
        }
        long before = System.nanoTime();
        square(numbers);
        long after = System.nanoTime();
        System.out.println("recursion execution time of " + size + " elements is " + (after - before));

        System.out.println(numbers);
    }