Construction of the resulting intersection as I've stated is almost child's play.
Just some friendly advice. I advise against the use of QuickSort as it has terrible performance in rare but very realistic cases.
Somehow, this seems like an answer to somebody’s question, but I don’t know what the question was. Is this for a new version of JEOPARDY — The QB64 Edition!!