Infogain Interview Question

Find nearest int for a given integer from a integer array