360Logica interview question

Java