Samsung Electronics Interview Question

processing vs table lookup efficiencies