There is a few test cases which are missing in the question,So write a solution by your own so that it should pass the test cases which are not mentioned there also,,i am writing one test case here ...