Find integer in most intervals | Meta Coding Question