Answer
Root pointer = 42
Work Step by Step
To represent the given tree structure in memory, we need to fill in the blank cells accordingly. Let's map out the tree structure based on the memory contents:
```
Node C (at 30)
Left: null → 31 = 0
Right: E is at 39 → 32 = 39
Node H (at 33)
Left: null → 34 = 0
Right: null → 35 = 0
Node K (at 36)
Left: H is at 33 → 37 = 33
Right: P is at 45 → 38 = 45
Node E (at 39)
Left: null → 40 = 0
Right: null → 41 = 0
Node G (at 42)
Left: C is at 30 → 43 = 30
Right: K is at 36 → 44 = 36
Node P (at 45)
Left: null → 46 = 0
Right: null → 47 = 0
The Final Memory Table looks as follows:
Address Contents
30 C
31 0
32 39
33 H
34 0
35 0
36 K
37 33
38 45
39 E
40 0
41 0
42 G
43 30
44 36
45 P
46 0
47 0
The root node is G, which starts at address 42.
So the root pointer = 42