This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #How to use: | |
| # Initiate an array with any name and call function 'merge_sort' that takes array as an input, start as 1 and end as length of array. | |
| def merge(arr, start, mid1, mid2, end): | |
| left_array = arr[start -1 : mid1] | |
| mid_array = arr[mid1: mid2 + 1] | |
| right_array = arr[mid2 + 1 : end] |