Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Tyrell has an array arr, denoting the weights of N burgers. The burgers can be eaten only continously i . e in sequence as in

Tyrell has an array arr, denoting the weights of N burgers. The burgers can be eaten only continously i.e in sequence as in arr. What should be the minimum weight eating capacity per day, of Tyrell, to consume all the burgers in k days?
Input format
The first line will contain the size of an array, N
Next N lines will contain N integers denoting array arr.
The last line will contain integer k.
Constraints
1=k=N=1000
1=arr[i]=500
Examples
Input:
10
1
2
3
4
5
6
7
8
9
10
5
Output:
15
Explanation:
k =5
arr =[1,2,3,4,5,6,7,8,9,10]
1st day: 1,2,3,4,5->15
2nd day: 6,7->13
3rd day: 8->8
4th day: 9->9
5th day: 10->10
Min Cap to eat in a day required ->15
#includennarr(n)=nk(arr,k)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

5-25. Bringing about the destruction of a dream is tragic.

Answered: 1 week ago