Data Structure Shell Sort Algorithm MCA Sem 2

Data Structure Algorithm for Shell sort pseudo-code.

After knowing and completely understanding this algorithm for Shell sort. You will be able to write a Data Structure Program for Shell sort in any language. The basic ideology and idea behind all the programs will be same. Yes the programs will differ according to the syntax and semantics of the language. This is a part of Mumbai University MCA Colleges Data Structure MCA Sem 2

Algorithm ShellSort(list) (* Assume the list is not empty. *)
1 set increment to half the list length
2 loop (* for each value of increment *)
1 …
2 loop (* for each segment *)
1 …
2 loop (* for finding the correct position for each element *)
1 …
2 store the element in correct position
3 end loop
4 move to next segment
3 end loop
4 set increment to increment/2
3 end loop
End ShellSort

Hope this Algorithm is useful to you in some sense or other. Keep on following this blog for more Mumbai University MCA College Programs. Happy Programming and Studying.

No comments:

Post a Comment