DXC Technology interview question

Basic of DSA, logical ability and java.