It is FBI's database (including their overseas resources) that they use for NC, so it does not matter where you spend your past time. I've seen friends who spent all time back in China before coming to US getting their whole naturalization done in 5 months.