Question :
Suppose that you are searching an unsorted array of objects that might contain duplicates. Devise an algorithm that returns a list of the indices of all objects in the array that match a given object.
If the desired object is not in the list, return an empty list.? Please provide a pesudo code!
Repeat the previous question but for a sorted array. Your algorithm should be recursive and efficient. Psuedo Code is fine!