Insertion sort problem


My algorithm is correct I believe and I’ve checked for a few other test cases as well.But I don’t know why my code fails.

just remove endl while printing use space instead
you have to print the output in same line

1 Like