Thankyou Shaarang this helped me a lot and raised another doubt. I
think you can help me further...
instead of the array of object I now used class pointers and created
some objects dynamically.
I modified the PQ decalration to hold pointers but i get an unexpected
result..
here's what i did
for pointers you must do the following(2 modifications that you must do):
includeiostream
#includevector
#includequeue
using namespace std;
int j;
class vertex
{
public:
vertex *parent;
int value;
vertex()
{
If the number of articles to do this is more than one, and if space
isn't much of a concern, one might considering constructing a trie
structure for the dictionary (this would take an O(nT) worst case
time where n is the length of the longest word in the dictionary.
However, for subsequent uses