Question d’entretien chez Sierra Wireless

solve the data structures question using java and specify its time and space complexity.