We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 605d078 commit 78871feCopy full SHA for 78871fe
code_to_optimize/bubble_sort_multithread.py
@@ -8,7 +8,7 @@ def multithreaded_sorter(unsorted_lists: list[list[int]]) -> list[list[int]]:
8
sorted_lists = [None] * len(unsorted_lists)
9
10
# Use ThreadPoolExecutor to manage threads
11
- with concurrent.futures.ThreadPoolExecutor(max_workers=4) as executor:
+ with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
12
# Submit all sorting tasks and map them to their original indices
13
future_to_index = {
14
executor.submit(sorter, unsorted_list): i
0 commit comments