DBS Bank interview question

mostly from java certification in written test