>>12578220looked at it for five minutes and came to the same conclusion of C if I had to pick the answer right now. I don't like C because it lacks certain symmetrical solution properties. I also used a different method where.
B2 is a filter applied to column two. I was expecting to see it to also apply on A2 and C2. I have a couple more ideas I am going to try after I eat.
Btw your method isn't consistent on row 1. There is a left pointer missing on C1