Ugam Interview Question

data structures and algorithms to show that.