https://github.com/haotang923/interview/tree/master/IKM Q1. If most of the calls to function foo() below pass one of 10 particular values, which method will significantly reduce the execution time of calling the function? A. Replace * with an if-else…