@Override
    public Solution findSolution(Node firstStep, Node target) {
        Set<Node> foundNodes = new HashSet<>();
        Stack<Node> stepPath = new Stack<>();
        stepPath.push(firstStep);

        while ( ! stepPath.empty() ) {
            Node currentStep = stepPath.pop();
            boolean targetFound = currentStep.equals(target);
            if ( targetFound ) {
                return createSolution(currentStep, foundNodes, stepPath);
            }
            foundNodes.add(currentStep);

            for ( Node nextStep : currentStep.nextSteps() ) {
                boolean reachToMaxDepth = maxDepth == nextStep.currentDepth();
                if ( reachToMaxDepth ) {
                    continue;
                }

                boolean isVisited = foundNodes.contains(nextStep);
                if ( isVisited ) {
                    continue;
                }

                stepPath.push(nextStep);
                foundNodes.add(nextStep);
            }
        }

        return null;
    }