FIS interview question

Java related and DSA and coding problem