works for given test case
runtime error