J.P. Morgan Interview Question

How Map works Internally ?