title: Find groups of consecutive numbers inside an array
body: <p>I need an algorithm to find a sequence of numbers inside an array, with a pre-defined lenght. By example:</p>
  
  <blockquote>
    <p>Given the lenght 3 and the array:</p>
    
    <p>{2, 9, 0, 6, 1, 2, 3, 6, 6, 1, 0, 1, 2, 3, 5, 4, 0, 3, 7, 1, 2, 3, 7, 5, 0}</p>
    
    <p>the algorithmn should return the 3 sequences of {1, 2, 3} inside the
    array.</p>
  </blockquote>
  
  <p>Anyone can point a direction to how accomplish that? I am workin with Java, but I am accepting examples in any language, since I be able to translate to Java.</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>In my project, I have a large ordered sequence of a pair [date, hour] (which easily can have hundreds of itens, and I need to know how much sequences of sequential pairs I have.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>More about the question:
  Given the original array, I need get other taken inside it, each one formed by the consecutive sequences of numbers.</p>