Added intuition and algorithm for Q2.