Let the size of the first array is N and the size of the second array is M. The big O of the time complexity of this algorithm is O(N + M)
In the beginning, we put all elements in the first array into a HashSet object, the time complexity is O(N) because we walk throught all elements, and saving a element into a hash set only costs a constant time.
In order to determine if the second array is a subset of the first array, we walk through all elements in the second array, and check if each element has already been in the hash set. Because finding a element in a hash set also costs a constant time, the time complexity is O(M)
After executing the above steps, we can know if the second array is a subset of the first array. The total time complexity is O(M + N)