Suggest a heuristic for solving the optimization version of the Traveling Salesman Problem (TSP). Show how the algorithm works using two different input cases, one of which it finds the optimal solution and another in which it fails to find the optimal solution. Also, provide a special case of a possible input for which an optimal algorithm can always be found in polynomial time.