a) Suppose we have an unsorted array of size ‘n’ and we want to find a middle element of the array. Describe an algorithm which will take O(nlogn) time.(just a paragraph of maximum three lines).

b) What will be the upper bound to choose middle element, if array( in part ‘a’) is already sorted.

Recommended Answers

All 2 Replies

We don't take kindly to people just posting their homework problems without any proof of effort on their part.

Nice avatar Narue. Tenjou Tenge is awesome... And Maya is hot. There... I said it :).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.