aQb Solutions Interview Question

How I make optimize api?