File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 3
3
4
4
sys .setrecursionlimit (1000000000 )
5
5
6
- def mergeSort (myList , process , thread ):
6
+ def mergeSort (myList ):
7
7
if len (myList ) > 1 :
8
8
mid = len (myList ) // 2
9
9
left = myList [:mid ]
10
10
right = myList [mid :]
11
- if process == True and thread == True :
12
- with concurrent .futures .ProcessPoolExecutor () as executor :
13
- executor .submit (mergeSort ,left ,False ,True )
14
- executor .submit (mergeSort ,right ,False ,True )
15
- elif process == False and thread == True :
16
- with concurrent .futures .ThreadPoolExecutor () as executor :
17
- executor .submit (mergeSort ,left ,False ,False )
18
- executor .submit (mergeSort ,right ,False ,False )
19
- elif process == False and thread == False :
20
- mergeSort (left ,False ,False )
21
- mergeSort (right ,False ,False )
11
+ mergeSort (left )
12
+ mergeSort (right )
22
13
# Two iterators for traversing the two halves
23
14
i = 0
24
15
j = 0
You can’t perform that action at this time.
0 commit comments