Please fill out this quiz, and press the "Submit" button at the end. Don't collaborate with anyone on quiz exercise solutions.
Please answer all questions.
SID: [No spaces and no dashes.]
Login ID :
1. (a) Suppose I tell you that the polynomial p(x) has real coefficients and degree 3. If I told you the value of p(x) at four different values of x, is this enough to uniquely determine p(x)? (b) Does your answer to part (a) depend upon what four values of x I choose? (c) Would your answer change if p(x) had degree 4 instead of degree 3?
/* Requires the array A to be sorted. Checks to see if the * value v appears in the array A. If it does, returns an * index where v appears (i.e., a value i such that A[i]==v); * otherwise, returns -1 if v does not appear in A. */ public static int bsearch(int[] A, int v) { int l=0, r=A.length; while (l < r) { int midpoint = l + (r-l)/2; ??? } return -1; }