title: how to find if 2 elements of an array contains a certain value
body: <p>Somehow I managed to find one certain value with the below code but how can I search if an array has value 1 and the right next value is 3 </p>
  
  <pre><code>unlucky1([1, 3, 4, 5]) → true
  unlucky1([2, 1, 3, 4, 5]) → true
  unlucky1([1, 1, 1]) → false
  
  public boolean unlucky1(int[] nums) {
    //int[] a = new int[] {1,3};
  
    for(int i: nums)
    {
      if (i == 1 )
  
      return true;
  
    }
      return false;
  
  
  }
  </code></pre>