Wise interview question

Hackerrank question 2 DSA, 1 qns about calling API