[algogeeks] Re: priority queue using C++ STL

2008-06-15 Thread Pratyush
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

[algogeeks] Re: priority queue using C++ STL

2008-06-15 Thread shaarang tyagi
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() {

[algogeeks] Re: Terms extraction

2008-06-15 Thread Mayur
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