alternate color on two consecutive rows

Solutions on MaxInterview for alternate color on two consecutive rows by the best coders in the world