Removing the solutions from LinkedList.