What is a showArray(...),where it is?.please post your code in full or either put a link for your full code so that we can help you better.
did you have performed the insertion sort after the gap sorting.please show your full code.
Try to enjoy your work while doing it,it will Automatically convert in Hard Work...
Just saying "it doesn't work" is useless. What are you seeing? Any errors? Does it end with the array still not sorted? Are you displaying the results after you exit the outermost loop? Please TellTheDetails
Practice only makes habit, only perfect practice makes perfect.
Practice mindfully by doing the right things and doing things right.— Junilu