Menu

60 Pts Give Efficient Algorithm Find Closest Pair Please See Explanation Arbitrary Array 2 Q43830655

(60 pts) Give an efficient algorithm to find the closest pair(please see the explanation below) in an arbitrary array (25 pts).You may write your algorithm in pseudocode. And perform the runtimeanalysis line by line analysis as I did in the video tutorialsunder Module 1 (25 pts). Also, write C++ code for the givenproblem. Create random arrays size of N={10, 100,1000}. Then reportyour timings in terms of microseconds (10pts). Does your real-time(experimental) timing support theoretical complexity analysis?Why/Why not? *** Closest Pair Problem: Assume that A =[a1,a2,a3,…,an] is an integer array and A is not a sorted.Closest pair of A is the two values from A where the absolute valueof |ai-aj| is minimum.

Expert Answer


Answer to (60 pts) Give an efficient algorithm to find the closest pair (please see the explanation below) in an arbitrary array (…

OR