Given an integer x and a positive number y, write a function that computes xy under following conditions.
a) Time complexity of the function should be O(Log y)
b) Extra Space is O(1)
Examples:
Input: x = 3, y = 5
Output: 243
Input: x = 2, y = 5
Output: 32
Iterative O(log) function for pow(x,y) : https://www.geeksforgeeks.org/write-an-iterative-olog-y-function-for-powx-y/