all test case wrong for input abcd, it is printing adcb, adbc how to handle this?
@dhairya16 refer to this corrected implementation here