Pergunta de entrevista da empresa HM Revenue and Customs

reverse a list using java. explain the complexity. write tests