Ugam interview question

data structures and algorithms to show that.