Given two year number a and b (eg a=1000 b=2000). Find the number of 1st January Sundays? Given 1st Jan 2001 was Monday?
I figured that day sequence repeat after 28 years. But produced wrong answer. Help me figure it out.
PS: This was actually programming question and i wanted to get a O(1) solution.