Question: Question 1. Algorithm Give an algorithm in pseudocode for finding the smallest absolute difference between any pairs of integer numbers in a given sequence. For
Question 1. Algorithm Give an algorithm in pseudocode for finding the smallest absolute difference between any pairs of integer numbers in a given sequence. For instance, if the input sequence is (3, 7, 1, 23, -13), the output has to be 2. Question 2. Time complexity Analyze the time complexity of your algorithm with respect to the input size. Consider the worst-case and the number of elementary operations. Do not use the Big-O notation. Question 3. Big-o [30 pts) Give a reasonable asymptotic upper bound for the time complexity of your algorithm using the Big-O notation. Prove your answer. English (United States Focus
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
