Tokopedia interview question

Power function (various approach and optimization)