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.
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.
Related questions
Question
I need help with this please
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images