IBM interview question

Dsa and java knowledge were asked