Samsung Electronics interview question

processing vs table lookup efficiencies