Add Question 37-40.

All passed OJ test cases.