Algorithm for determining changes between 2 lists as quicky as possible?
<p>I have Projects.</p>

<p>These projects are downloaded from Site A into my site via an API.</p>

<p>I download all Projects from Site A.</p>

<p>There are matching JSON objects on my side. What is important is I need to do this.</p>

<p>List A (My site) needs to be Synced with List B (Their site).</p>

<p>I have to manually sync due to their api limits.</p>

<p>So there are projects and attributes:</p>

<p>Given list A and List B. What would be a fast algorithm so that:</p>

<pre><code>If A is missing object from B, add it.
If B no longer contains an element found in A, remove it from A.
If an attribute in B is != an attribute in an object from A, update the object in A.
</code></pre>

<p>I feel like the only way to do a lot of this would be O (N^2). Is there a way to get better than O(N^2) on some of this?</p>

<p>Thanks</p>
