Arrays-intersection of two arrays

can you provide certain hint for this problem?

Hey @shubhangis248

  1. Make a frequency map for each element in the first array i.e. store the frequency of each element in the first array.
  2. Iterate over the second array and search for current element in the freq map.
  3. If an entry is found , decrease its frequency in the freq map and push this element into your final answer array.
  4. Display the elements of this answer array after sorting it.