Write an algorithm that prints out all the subsets of three elements of a set of n elements. The elements of this set are stored in a list that is the input to the algorithm.
Define basic operations for your algorithms, and analyze the time complexity of this algorithm. If a given algorithm has an every-case time complexity, determine it. Otherwise, determine the worst-case time complexity.