SAP Ariba interview question

Basic java DS, another one involving string reversal