Part B: Problem 3: Write an algorithm (using psuedocode or any other language) that finds the two closest numbers in an array, and has a runtime complexity of O(nlogn). Use a series of pictures to show how your algorithm works. Example: If A = [6.1, 3.14, 78, 2.99, 8.0], your algorithm should return 3.14 and 2.99.

icon
Related questions
Question

I need help with this please

Part B: Problem 3: Write an algorithm (using psuedocode or any other
language) that finds the two closest numbers in an array, and has a runtime
complexity of O(nlogn).
Use a series of pictures to show how your algorithm works.
Example:
If A = [6.1, 3.14, 78, 2.99, 8.0], your algorithm should return 3.14 and 2.99.
Transcribed Image Text:Part B: Problem 3: Write an algorithm (using psuedocode or any other language) that finds the two closest numbers in an array, and has a runtime complexity of O(nlogn). Use a series of pictures to show how your algorithm works. Example: If A = [6.1, 3.14, 78, 2.99, 8.0], your algorithm should return 3.14 and 2.99.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer