How to recognize the meaning of a linked list function in c++ : <p>I'm currently stuck on some functions operating on single linked lists made with a struct in c++. </p>

<p>I am supposed to find out what do these functions do without compiling, but I cannot seem to have understood the theory behind it completely, since my guesses are all to generic.</p>

<p>Is there a way to guess the reason behind these function's existence just by looking at them? And what do they do?</p>

<p>Also, what will happen if I call q(la, lb) if la=(2, 3, 4, 5, 1, 6) and lb=(3, 4, 5)?</p>

<pre><code>bool u(List l, int x) {
  if (l=nullptr) return false;
  if (l-&gt;info == x) return true;
  return u(l-&gt;next, x);
}

void v(List&amp; l, int x) {
  List tmp = new (cell);
  tmp-&gt;info = x;
  tmp -&gt; next = l;
  l = tmp;
}

List q(List l1, List l2) {
  List aux = nullptr;
  while (l1!=nullptr) {
    if (!u(l2,l1-&gt;info)) v(aux,l1-&gt;info);
    l1=l1-&gt;next;
  }
  return aux;
}
</code></pre>
