added test cases for problem 909 C++