advanced sorting new physical sublists are created in each recursive call as the list is subdivided we learned in that the slice operation can be time consuming since new list has to be created and the contents of the slice copied from the original list new list is also created each time two sublists are merged during the unwinding of the recursionadding yet more time to the overall process finallythe sorted list is not contained within the same list originally passed to the function as was the case with the sorting algorithms presented earlier in improved implementation we can improve the implementation of the merge sort algorithm by using technique similar to that employed with the binary search algorithm from instead of physically creating sublists when the list is splitwe can use index markers to specify subsequence of elements to create virtual sublists within the original physical list as was done with the binary search algorithm figure shows the corresponding index markers used to split the sample list from figure the use of virtual sublists eliminates the need to repeatedly create new physical arrays or python list structures during each recursive call first mid last firstl lastl firstr lastr left sublist right sublist figure splitting list of values into two virtual sublists the new implementation of the merge sort algorithm is provided in listing the recmergesort(function is very similar to the earlier implementation since both require the same steps to implement the merge sort algorithm the difference is that recmergesort(works with virtual sublists instead of using the slice operation to create actual sublists this requires two index variablesfirst and lastfor indicating the range of elements within the physical sublist that comprise the virtual sublist this implementation of the merge sort algorithm requires the use of temporary array when merging the sorted virtual sublists instead of repeatedly creating new array and later deleting it each time sublists are mergedwe can create single array and use it for every merge operation since this array is needed inside the mergevirtuallists(functionit has to either be declared as global