An algorithm It made up of 3 parts that execute consecutivel
Solution
Given there are 3 parts.
First part efficiency is: O(3n + 5).
Second part efficiency is: O(nlogn + n)
Third part efficiency is: O(n2).
When you have multiple parts with different efficiencies in the algorithm, please note that, the overall efficiency of the algorithm is: the one part which takes the maximum amount of time, i.e., the one part with least efficiecny.
As per your specification, the least efficient part is the third part. And it therefore, the order of the algorithm as a whole is: O(n2).
