I got this question in elixir interview
They started with giving me two arrays
a = [1, 2, 2, 2, 3, 4, 4, 5, 6, 6]
b = [2, 4, 1, 1, 3, 3, 4, 5, 6]
I had to match 1st array with other array and if the numbers matched we have to write the indexes of it.
Like example
[1, 0] [2, 0] [3, 0]
Like this all that which is matching from the first array numbers to second array number we have to write all the indexes of it.
So I mostly write api’s and never used this kind of an example to write particular logics. So I couldn’t do it
I want to ask how can I write this logic here.