- You've been provided the "snapshot" of a heap with 64 addressed slots link to printable map
- The marker for "Array Start" is 126
- The slot after an "Array Start" is the address of the first value
- The slot after that first value is the address of the second value
- The slot after the second value is the address of the third value, and so on
- The marker for "Array End" is 127
- Write out the values in this array in normal JavaScript notation
- Modify your heap by adding a new value,
112
, on to the end of the array. You should only change the values stored in three slots of the heap (two blanks, one with existing data). - Modify your heap by adding a new value,
111
, to the beginning of the array. You should only change the values stored in three slots of the heap. - You can
count
the number of elements by following one link after another. How many "jumps" does it take to get from the Array Start to the Array End? How does this compare to the count? What formula would you write to find the number of data elements relative to the number of jumps? - Extension: Remove the fifth element of the current array by only changing the value of one slot. What does this imply about the relationship between variable-length arrays and garbage collection?