⌘K
Flycodx

Cloud Kitchen Order Parallel Processing

Cloud Kitchen Order Parallel Processing

HardArrays0% accepted

Arjun's cloud kitchen in Mumbai has K chefs and N orders with varying preparation times. Distribute orders optimally among chefs to find the minimum total time to prepare all orders.

Approach

Given an array of N order times and K chefs, find the minimum time to process all orders.

Input

n=4, k=2, orders=[10,20,30,40]

Output

50
solution.py
Loading editor...
Test 1
Test 2
Test 3

Press Run to test your custom input, or Submit to judge against all test cases.

Sign in to continue

Create a free account to run code, submit solutions and track progress.

  • Free forever — no credit card
  • 10+ languages with live execution
  • Points, streaks & leaderboards
Auto Save OnLn 1, Col 1Spaces: 4UTF-8LFPython 3