I am presented with the following problem: In an array of $n$ sorted numbers and $f(n)$ unsorted numbers where $f(n)=O(\log n)$, find an algorithm to sort the entire array in $O(n)$ time.
What I am getting from this is that I should find an algorithm to sort $n + O(\log n)$ numbers in $O(n)$ time. I think the first step would be to sort the $O(\log n)$ numbers in $O(n)$ time. But the only sorting algorithm I have learned that can possibly be $O(n)$ is insertion sort, and that is only in the best case when all the numbers are already sorted. The $O(\log n)$ numbers part confuses me as well since $O(\log n)$ isn't an integer as far as I know but a function.
I really don't know where to begin on this, so I'd be very grateful for any and all advice. Thank you all!