My Computer Forum

My Computer Forum (http://mycomputerforum.com/)
-   Algorithms (http://mycomputerforum.com/algorithms/)
-   -   Find interval with the smallest variance in sequence (http://mycomputerforum.com/algorithms/3010-find-interval-smallest-variance-sequence.html)

keram March 10th, 2014 01:15 PM

Find interval with the smallest variance in sequence
 
Let's have:
N - length of sequence of numbers;
M - length of interval we want to find;
and sequence of numbers.
We wont to find interval of M numbers with the smallest variance.
Can I find out this interval quicker then O(MN)?
For example:
N = 5, M = 3
9 4 6 3 8
Solution is: 4 6 3.
(9 4 6 is as good as 6 3 8)
Thank you..
.. and I'm sorry for my bad English.


All times are GMT -8. The time now is 09:16 PM.

Copyright © 2019 My Computer Forum Forum. All rights reserved.