Bounteous x Accolite interview question

1- Simple java question, 2 .Linked list reverse