aiqfome interview question

Design an specific algorithm.