Submission 2 - Passed only 14 test cases.