checking solutions with some test cases