Problem: Maximal Average on Array

Revision en2, by Hoyda, 2017-11-30 10:41:43

Problem: You are given an aray of N elements(N<1e6). You have to find maximal average of some continuous part of array. Minumum length of part=A, Maximum length =B (A,B<N).

Example: A=2,B=4,array={1,-3,6,2,5} Answer: 4.333

How to solve this problem?

Tags zor, average

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Hoyda 2017-11-30 10:41:43 56 (published)
en1 English Hoyda 2017-11-30 09:52:07 263 Initial revision (saved to drafts)