Nagarro interview question

data structure questions with high complexity