.. (לתיקייה המכילה) | ||
Can I use a sorting algorithm in Question 2 ? | |
Yes. Moreover, every optimal algorithm for question 2 whose time complexity is O(f(n)), can be used to devise a sorting algorithm that runs in O(f(n)) for every 'regular' function f. Therefore, f is at least omega(n log n). |