McAfee Interview Question

puzzles on maths and Data structure