I have two Arrays of doubles. One Array will be sorted and after this I want to check if every Element of the original Array is still in the sorted Array. I used the find() function of C++ but this pointer only points to the first Element if found, e.g. if you have as original Array {1, 1 ,1 ,1}, the sorted one is {1, 1, 1, 1} but find() only points to the first Element.
Do I really need to loop through the original Array and count the number of times the Elements occure and then loop through the sorted Array and do the same?