Add Question 45-46.

All passed OJ test cases.