Question 1 and Question 2

Company: Microsoft(Intern)

Difficulty: medium