
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

class btree { protected: int *p; // array of values int *f; // array of flag unsigned int size;
public: btree(unsigned int s) { int i; p = new int [s]; f = new int [s]; size = s; for (i=0; i<s; ++i) f[i] = 0; }
PreOrderVisit (int v) // A function to visit the tree in pre order, starting from // node with index v, InOrderVisit (int v) // A function to visit the tree in- In order, starting from node // with index v, PostOrderVisit (int v) // A function to visit the tree in post order, starting from // node with index v, };