public List <Node <T> > Search()
        {
            var solutionNodes = new List <Node <T> >();

            VisitedNodes = new List <Node <T> >();
            Node <T> tempNode      = null;
            var      goalNodeFound = false;

            while (!IsEmpty())
            {
                tempNode = RemoveFront();
                if (_searchProblem.IsGoalNode(tempNode))
                {
                    goalNodeFound = true;
                    Console.WriteLine("The goal node is found");
                    break;
                }

                if (IsExpandVisitedNodesEnabled)
                {
                    if (IsNodeVisited(tempNode))
                    {
                        continue;
                    }
                }
                AddNodes(_searchProblem.ExpandNode(tempNode));
                VisitedNodes.Add(tempNode);
            }

            if (!goalNodeFound)
            {
                Console.WriteLine("Goal node was not found");
            }

            if (tempNode != null)
            {
                solutionNodes = GetPath(tempNode);
            }

            return(solutionNodes);
        }