can you tell me, how to write main function of this problem ? https://leetcode.com/problems/find-in-mountain-array/