Add Question 49-50.

All passed OJ test cases.