Adobe interview question

Implementation of power function, Ancestor node, first dissimilar element.in the array