Amazon interview question

data structures in java and javascript for front end