Answer:
Code is provided in the attachment form
Explanation:
Vector Multiplication code:
Vector_multiplication.c file contains C code.
See attachment no 1 attached below
Classification of Algorithm: For creating elements in vector c of size n, number of scalar multiplications is equal to n. The size of original two vectors scales directly with the number of operations. Hence, it is classified as O(n).
Answer:
Thank you for the free points.
Answer:
c) it will always return with an answer of 7 or fewer comparisons of data.
Explanation:
As maximum number of comparison in worst case for sorted binary search is log₂n, here n = 100, so maximum search is at least 6.6 which is approximately 7.