title: Return the number of times the string "hello/HELLO/hellO ..." appears anywhere in the given string
body: <blockquote>
    <p>Return the number of times the string "hello/Hello/...etc" appears anywhere in the given string.</p>
    
    <p>The different in the problem is that </p>
    
    <p>The string hello can be in any case i.e either  upper case or lower case.</p>
  </blockquote>
  
  <p><strong>Sample Input #1</strong><br>
  count("abc hello def")</p>
  
  <p><strong>Sample Output #1</strong><br>
  1</p>
  
  <p><strong>Sample Input #2</strong><br>
  count("Hi. Hello. Hello. Ok")</p>
  
  <p><strong>Sample Output #2<br></strong>
  2</p>
  
  <p><strong>Sample Input #3<br></strong>
  count("hi")</p>
  
  <p><strong>Sample Output #3<br></strong>
  0</p>
  
  <p><strong>MyApproach</strong></p>
  
  <pre><code>public int count(String str)
      {
        String str1="Hello";
  
          int l=str.length();
          int l1=str1.length();
          if(l&lt;l1)
          {
           return 0;
          }
          else
          {
             int count=0;
             int p=0;
             int j=0;
             while(j&lt;l)
             {
              char c=str.charAt(j);
              char c1=str1.charAt(p);
              if(c==c1)
               {
                 p++;
  
                 if(p==l1)
                 {
                  count++;
                  p=0;
                 }  
  
               }
               else
               {
                   p=0;
               }
               j++;
  
             } 
  
       return count;
      }
  
  }
  
  Output       TestcaseParameters Testcase Actual Answer  Expected
  
  No output    'HELLO how are you'               0             1
  </code></pre>
  
  <p>I am getting the following output.</p>
  
  <blockquote>
    <p>Can anyone tell me what I am doing wrong?</p>
  </blockquote>