public static DynamicArray<String> generateRandom(int size) {
        DynamicArray<String> array = new DynamicArray();
        for (int i = 0; i < size; i++) {
            String line = "";
            for (int j = 0; j < size; j++) {
                if (j > i) {
                    int random = r.nextInt(100);
                    if (random < 85) {
                        line += "x ";
                    } else {
                        line += 1 + " ";
                    }
                } else {
                    line += "x ";
                }
            }
            array.insert(line);
        }
        return array;
    }