private static List<Operation> getOperations(char[] source, char[] target, int[][] positionMinimum) {
        List<Operation> operations = new ArrayList<>();

        boolean stop = false;
        int i = source.length;
        int j = target.length;
        Character operandeG;
        Character operandeD;

        while (!stop) {
            operandeG = null;
            operandeD = null;
            if (i - 1 >= 0) {
                operandeG = source[i - 1];
            }
            if (j - 1 >= 0) {
                operandeD = target[j - 1];
            }
            operations.add(0, new Operation(positionMinimum[i][j], operandeG, operandeD));

            switch (positionMinimum[i][j]) {
                case INSERT:
                    // on monte dans le tableau
                    i--;
                    break;
                case DELETE:
                    // on va à gauche
                    j--;
                    break;
                case SUBSTITUTION:
                    // on monte en haut à gauche
                    j--;
                    i--;
                    break;
                default:
                    // exeception;
                    break;
            }
            stop = ((i < 0) || (j < 0)) || (i == 0 && j == 0);
        }

        return operations;
    }