Jobra drops you into a broken repo. Find it, fix it, ship it. AI helps you debug like on the job.
Jobra drops you into a broken repo. Find it, fix it, ship it. AI helps you debug like on the job.
Mode: On-Campus Exam Pattern: 2 coding OA Date: 2026-08-10
You are given an array A of size N and an integer K.
You need to partition the array into exactly K non-empty, contiguous, non-overlapping sectors.
The cost of each sector is defined as: [ \text{Cost}(L,R)=A[L]+A[R] ]
where A[L] and A[R] are the first and last elements of that sector.
Calculate:
Example: N = 5 K = 2 A = [1, 5, 3, 4, 2]
Microsoft • 161 views
Microsoft • 170 views
Microsoft • 169 views
Microsoft • 165 views
Microsoft • 166 views