mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-02-25 02:18:39 +00:00
Updating scheduling/split_workload.py
implementing recommendations Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
parent
d7437a22b6
commit
f12ae10b43
@ -28,9 +28,9 @@ def split_list(timings: list) -> tuple:
|
|||||||
|
|
||||||
def split_workload(arr: list) -> tuple:
|
def split_workload(arr: list) -> tuple:
|
||||||
if len(arr) == 0:
|
if len(arr) == 0:
|
||||||
result = ([], [], 0)
|
return ([], [], 0)
|
||||||
elif len(arr) == 1:
|
if len(arr) == 1:
|
||||||
result = ([arr[0]], [], 1)
|
return ([arr[0]], [], 1)
|
||||||
else:
|
else:
|
||||||
n = len(arr)
|
n = len(arr)
|
||||||
smallest_diff = float("inf")
|
smallest_diff = float("inf")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user