Adobe Interview Question

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