GFT Technologies Interview Question

don't remember. Some simple algorithm.