Sum 1 to n excluding multiples of 5 or 7
Company: Bank of America
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: easy
Interview Round: Other
Overview: Return the sum of the integers from 1 to n, skipping every number divisible by 5 or by 7, for n as large as one billion. It tests math reasoning about arithmetic series, avoiding double counting, and keeping large sums exact without a linear loop.