From ff6d8603bf0c1bde8cc7af038be7bdc15b30a4b3 Mon Sep 17 00:00:00 2001 From: Venkatesh D Date: Fri, 1 Oct 2021 16:48:15 +0530 Subject: [PATCH 1/2] Added the program for Merge sort --- Python/mergeSort.py | 61 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Python/mergeSort.py diff --git a/Python/mergeSort.py b/Python/mergeSort.py new file mode 100644 index 00000000..a9b15ade --- /dev/null +++ b/Python/mergeSort.py @@ -0,0 +1,61 @@ +# Python program for implementation of MergeSort +def mergeSort(arr): + if len(arr) > 1: + + # Finding the mid of the array + mid = len(arr)//2 + + # Dividing the array elements + L = arr[:mid] + + # into 2 halves + R = arr[mid:] + + # Sorting the first half + mergeSort(L) + + # Sorting the second half + mergeSort(R) + + i = j = k = 0 + + # Copy data to temp arrays L[] and R[] + while i < len(L) and j < len(R): + if L[i] < R[j]: + arr[k] = L[i] + i += 1 + else: + arr[k] = R[j] + j += 1 + k += 1 + + # Checking if any element was left + while i < len(L): + arr[k] = L[i] + i += 1 + k += 1 + + while j < len(R): + arr[k] = R[j] + j += 1 + k += 1 + +# Code to print the list + + +def printList(arr): + for i in range(len(arr)): + print(arr[i], end=" ") + print() + + +# Driver Code +if __name__ == '__main__': + arr = [12, 11, 13, 5, 6, 7] + print("Given array is", end="\n") + printList(arr) + mergeSort(arr) + print("Sorted array is: ", end="\n") + printList(arr) + +# This code is contributed by Mayank Khanna From cb56e7c7ccd8f7a18c0ad30008e9b654526e2d30 Mon Sep 17 00:00:00 2001 From: Venkatesh D Date: Fri, 1 Oct 2021 17:01:32 +0530 Subject: [PATCH 2/2] Job Portal Template --- Web Dev Projects/Job-portal-template | 1 + 1 file changed, 1 insertion(+) create mode 160000 Web Dev Projects/Job-portal-template diff --git a/Web Dev Projects/Job-portal-template b/Web Dev Projects/Job-portal-template new file mode 160000 index 00000000..d9c6f858 --- /dev/null +++ b/Web Dev Projects/Job-portal-template @@ -0,0 +1 @@ +Subproject commit d9c6f858d4b04d0a832f6ac738cab22e1de373c8