GSI Health interview question

Stack overflow question was one of them