srivatsa_k's submissions for second problem