Agilysys Interview Question

Oops with string manipulation, behavioural