What is the difference between a pointer and a reference?
Asked in the Round 1 stage. Demonstrate the distinction by simulating one pointer and one reference that initially refer to the same integer object.
Implement simulate_pointer_reference(initial_value, operations). Each operation is a dictionary with kind equal to pointer_rebind, pointer_write, or reference_write, and write operations include an integer value. A pointer rebind makes the pointer refer to a new object, while a reference write always modifies the original object. Return a dictionary containing original_value, pointer_target, pointer_value, and reference_value.
def simulate_pointer_reference(initial_value, operations):