Apart from it sounding like homework.... what language are you using? The answer could vary wildly from "iterating through arrays" to processing an array to languages that actually support sets and have an "in" command. Much less what is the data? How is it stored? "Set" and "subset" are pretty damned vague and could mean any of a thousand different things in "programming" given that damned near every programming languages handle the idea of a "set" differently.
I guess the answers to What is the difference between Machine,Assembly and High level programming language didn't sink in. What is the business problem you are trying to solve? There may be a better way to get your answer.