title: Time complexity of a method that checks a sublist in a linked list
body: <p>I need to write a method <code>public int subList (CharList list)</code>
  that gets a list and returns how many times this list exist. </p>
  
  <p>For example: </p>
  
  <p>my list is <code>a b c d a b g e</code> </p>
  
  <p>parameter list it<code>a b</code> it will return <strong>2</strong>. </p>
  
  <p>my list is <code>b b b b</code> </p>
  
  <p>parameter list is <code>b b</code> it will return <strong>3</strong>. </p>
  
  <p><strong>The method should be as efficient as possible.</strong></p>
  
  <p>Currently my problem is I don't know what do they mean when they say as efficient as possible, If I loop through the list n times, and everytime I find the same character I loop on both list and go back to where I was it will be O(n^2)? is there a better way to make is O(n) or below?</p>