s1 <= s2 answers true if every element in s1 is also in s2. They do not need to be sorted (I think the interpreter does that for you). So, that addresses the easy requirement, if not also the efficient requirement. As for the combinatorial req't, you might have to brute force it.
Replying to @SamuelAFalvoII
The <= operator on sets is a good hint. Thanks. I'm removing my initial post because after thinking about it more I realize that it's not equivalent to checking if string set is prefix free. (Which is unfortunate because that would be linear in the number of chars.)
11:40 PM - 11 Nov 2017
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.