I have two sorted lists of unique items and I want to find their set difference and set intersection in a fast and cache-friendly way, such as with the C++ std::set_difference and std::set_intersection.
However, now I am working in Kotlin and I cannot find the corresponding functionality. Since the Kotlin standard library is build on top of the Java standard library, a Java answer is welcome.
I read through this and this great questions and all the answers, but as far as I see, they deal only with arbitrary sets, thus fortfeiting the sortedness.
The same goes for Guava.