data structures using programming example write program to implement shell sort algorithm #include void main(int arr[ ]={- }int ijnflag gap_sizetempprintf("\ enter the number of elements in the array")scanf("% "& )printf("\ enter % numbers", )/ was added for( = ; < ; ++scanf("% "&arr[ ])gap_size nwhile(flag = |gap_size flag gap_size (gap_size for( = ( gap_size) ++ifarr[ +gap_sizearr[ ]temp arr[ +gap_size]arr[ +gap_sizearr[ ]arr[itempflag printf("\ the sorted array is\ ")for( = ; < ; ++)printf(% \ "arr[ ]) tree sort tree sort is sorting algorithm that sorts numbers by making use of the properties of binary search tree (discussed in the algorithm first builds binary search tree using the numbers to be sorted and then does an in-order traversal so that the numbers are retrieved in sorted order we will not discuss this topic in detail here because we assume that reader has already studied it in sufficient details in the complexity of tree sort algorithm let us study the complexity of tree sort algorithm in all three cases best case inserting number in binary search tree takes (log ntime sothe complete binary search tree with numbers is built in ( log ntime binary tree is traversed in (ntime total time required ( log no (no ( log nworst case occurs with an unbalanced binary search treei when the numbers are already sorted binary search tree with numbers is built in ( time binary tree is traversed in (ntime total time required ( (no( the worst case can be improved by using self-balancing binary search tree