Informatica interview question

Leetcode medium to hard