Logistics Hub Peak Throughput Problem
Logistics Hub Peak Throughput Problem — ExecCode Easy DSA Practice
Solve the Logistics Hub Peak Throughput problem on ExecCode. Free online easy DSA practice in Data Structures and Algorithms. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given the input needed to solve Logistics Hub Peak Throughput. Your task is to compute the required answer and return maximum valid k-hour sum, or -1. A sequence of values is given, and order matters. In Logistics Hub Peak Throughput, the goal is to transform, count, or select values according to the exact rule. Line 1: n k, then n throughput integers.
Examples
Input {"throughput": [10, 20, -1, 15, 30, 40], "k": 2}; Output 70. Input {"throughput": [5, 5, 5], "k": 4}; Output -1. Input {"throughput": [1, -1, 1], "k": 1}; Output 1
Constraints
1 <= n, k <= 10^5; throughput[i] in [-1, 10^4]
Practice Logistics Hub Peak Throughput free on ExecCode. Browse DSA problems, topic map, and placement guides.