Question: Templates intHeap.c: /** * The functions in this module implement a Heapdata structure * of integers. */ /** * heapDelete() removes the biggest integer in

 Templates intHeap.c: /** * The functions in this module implement a

Heapdata structure * of integers. */ /** * heapDelete() removes the biggest

integer in the heap and returns it. * */ int heapDelete() {

Templates

intHeap.c:

/** * The functions in this module implement a Heapdata structure * of integers. */

/** * heapDelete() removes the biggest integer in the heap and returns it. * */

int heapDelete() { return 0; //A dummy return statement }

/** * addHeap(thing2add) adds the "thing2add" to the Heap. * */ void addHeap(int thing2add) { }

/** * heapSize() returns the number of items in the Heap. * */ int heapSize() { return 0; //A dummy return statement }

-----------------------------------------------------------------------------

intHeap.c

/** * The functions in this module implement a Stack data structure * of integers. (Note that chars are also integers so this * integer Stack can be used for chars as well.) * * NOTE: the stack is implemented as a fixed size array (size = 100). * Consequently, no more than 100 integers can be pushed onto * the Stack at any given time. */

// Implementation hints: // The 3 functions--push, pop and isEmpty--share information // about the array used to implement the stack and the index // of the "top" of the stack. // // You may want to make these variables global... // ...but that would // be a mistake (because anyone using the module would have // to ensure that they did not use global variables with the // same names). // // An alternative in C is a "static global". // If a global variable is qualified as "static", it is global only // within the source code file where it is declared. // In parituclar, it cannot conflict with any other global variable. // // RECOMMENDATION: // Uncomment the following 2 lines and use these static globals! //static int top = 0; //static int stack[100];

/** * pop() removes the top integer on the stack and returns it. * * If pop() is attempted on an empty stack, an error message * is printed to stderr and the value -1 (minus one) is returned. */

int pop() { return 0; //A dummy return statement }

/** * push(thing2push) adds the "thing2push" to the top of the stack. * * If there is no more space available on the Stack, an error * message is printed to stderr. */ void push(int thing2push) { }

/** * isEmpty() returns a non-zero integer (not necessarily 1) if the * stack is empty; otherwise, it returns 0 (zero). * */ int isEmpty() { return 0; //A dummy return statement }

------------------------------------------------------------------------------------------

main.c

#include #include #include extern int pop(); extern void push(int);

int main(int argc, char * argv[]) { int value; while (scanf("%d ", &value) != EOF) { fprintf(stderr, "READING INPUT: %d ", value); // } exit(0); }

----------------------------------------------------------------------------------

Can you please help me with this at least a part of it?

Theory: XML tree representation The XML language is a textual encoding of a tree data structure. The first start-tag matches the last end-tag and represents the root of the tree Everything between these tags represent the root's children (which may be empty or be trees). The table below gives some examples. Description Tree with root node only XML Tree with root node and 1 child Tree with root node and 3 children Root with 2 children, 2nd child has 1 child node> Knode> Node identification The XML tree description above does not include information about the nodes. This can be fixed by allowing start-tags to have additional information associated with them. For example, a tree with a single root node with the information "foo" associated with it can be expressed in XML as . Similarly, a tree with a root (value 5) and two children (values 2 and 7) carn be expressed in XML as: node id-"5"> (Note: this is also a valid Binary Search Tree.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!