I have two lists (structure undecided), each contains column A and column B. I primarily need to know which elements of column A in list1 are missing in list 2 column A, or which ones in list2 column A are missing from list1 column A. I have no idea where to begin here. Of course a nested loop could achieve it, but there must be some elegant method.
THEN, for those matches where list1colA==list2colA, I also need to know whether or not list1colB==list2colB. I figure once the first question is answered, a single loop can determine this part, but if it can be combined with the above, that would be even better.
so for example, an ID and a timestamp for colA and colB
col A colB
So somehow it would know that colA=colA on 0,1,4, but timestamps are different on 1, and also that list2 has an extra#2 and list1 has an extra#3.
Just a nudge in the right direction is all I need.
Well, you could use std::set_difference() to find which elements are in one but not the other. However, that would require you to sort the inputs first. Just about every "elegant" method either requires you to sort or hash the inputs.