Support updates and count target-sum pairs | Capital One Interview Question