This is the second post in the Demystifying Programming Interview series, which aims at helping students and professionals who are…