Question: Part I The following memory image embeds a binary tree with root node at 0x804961c. Please draw the logical organization of the tree in the
Part I The following memory image embeds a binary tree with root node at 0x804961c. Please draw the logical organization of the tree in the same format as the shown example. Please indicate the address and key value (in hexidecimal) of all the tree nodes and the pointers from parent nodes to child nodes. The declaration of the tree node structure is as follows. struct tree_node { int key; struct tree_node * left; struct tree_Node * right; }; /* address of the root node */ tree_node * root; Key: 45 Addr: 0x8049a4c Addr: 0x8049a6c Key: 10 Addr: 0x8049a34 Key: 70 Example binary tree Memory image:0x80495f8: 0x0000000c 0x80495fc: 0x00000000 0x8049600: 0x00000000 0x8049604: 0x0000001f 0x8049608: 0x080495f8 0x804960c: 0x08049610 0x8049610: 0x00000022 0x8049614: 0x00000000 0x8049618: 0x00000000 0x804961c: 0x00000037 0x8049620: 0x08049604 0x8049624: 0x08049628 0x8049628: 0x0000003c 0x804962c: 0x00000000 0x8049630: 0x08049634 0x8049634: 0x0000004e 0x8049638: 0x00000000 0x804963c: 0x00000000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
