Efficient Trek

Efficient Trek is a coding interview problem from Linkedin interviews. Given an ordered list of trail lengths and a target number of days, partition the trails into consecutive daily groups (at least one per day) to minimize the sum of each day’s longest trail. Return the minimum total. A clear interview question focused on optimal partitioning under constraints.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: