title: Honeypot sample test Odd Numbers question
body: <p>So there is a Sample Test publicly available on the Honeypot site, and I'm confused about one of the tests.</p>
  
  <blockquote>
    <p>1 &lt;= l &lt;= r &lt;= 10^5</p>
  </blockquote>
  
  <p>l is starting number</p>
  
  <p>r is ending number</p>
  
  <p>Test is to return all the odd numbers between l and r including l and r if they happen to be odd.</p>
  
  <p>This was my code in the function that runs and expects an arraylist of integers as a return value:</p>
  
  <pre><code>    List&lt;Integer&gt; arraylist = new ArrayList&lt;Integer&gt;();
  
      for (int i = 0; i &lt; r - l + 2; i++) {
          if ((l + i % 2) == 1)
              arraylist.add(l + i);
      }
  
      return arraylist;
  </code></pre>
  
  <p>This code passed 8 out of 12 test cases, it failed test cases 7 - 10, but it doesn't show the test cases that it failed.</p>
  
  <p>I'm just curious about the test cases that this fails, cause I can't seem to figure it out.</p>
  
  <p>In what circuimstances would this code fail to do what it set out to do?</p>
  
  <p>Thanks.</p>