mysterious-toddler-20573
10/07/2022, 11:01 PMbrainy-ice-92385
10/08/2022, 6:53 AM^2 comes from. Compare two lists and add and subtract I see as simple O(n). Is there a possibility of a nested structure within the head that I'm missing?
For example current head:
<src 1>
<src 2>
Incoming head:
<src 2>
<src 3>
Steps:
1. Make a Set A of each entry's outerHTML in current head
2. Make a Set B of each entry's outerHTML in incoming head
3. For each key in A which does not exist in B, remove it from the current head
4. For each key in B which does not exist in A, add it to the current headmysterious-toddler-20573
10/08/2022, 6:14 PM