update two sum solution