Cloud Kitchen Order Priority Cooking
Cloud Kitchen Order Priority Cooking
MediumArrays0% accepted
A cloud kitchen in Bangalore receives N food orders with priority levels (1-5). Cooking time per order is priority * 10 minutes. Orders with same priority cook in arrival sequence. Find total cooking time.
Approach
Given N priorities in arrival order, sort by priority (stable), calculate total time = sum of (priority * 10).
Input
5
3 1 2 1 3
Output
150
More Arrays problems
Browse all coding problems →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