Given two arrays: a1[0..n-1] of size n and a2[0..m-1] of size m, the task is to check whether a2[] is a subset of a1[] or not. Both arrays can be sorted or unsorted.
Input: a1 = [11, 1, 13, 21, 3, 7], a2 = [11, 3, 7, 1]
Output: "Yes"
Explanation: All elements of a2 are present in a1.
Input: a1 = [1, 2, 3, 4, 5, 6], a2 = [1, 2, 4]
Output: "Yes"
Explanation: All elements of a2 are present in a1.
Input: a1 = [10, 5, 2, 23, 19], a2 = [19, 5, 3]
Output: "No"
Explanation: Element 3 from a2 is not present in a1.