0% found this document useful (0 votes)
3 views1 page

Code

code

Uploaded by

rahiminator
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Code

code

Uploaded by

rahiminator
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Extra Credit: (5 points, 20 lines): Write a recursive function: public int findXIndex(Dbl2Dbl f, int[] a, int x) that returns i such

that [Link](a[i]) equals x. Return -1 if no such i exists. You can assume (1) that the function f is monotonically increasing and (2) that the array a is sorted in increasing order. Little, if any, credit will be given for solutions that simply walk down the array calling [Link]() on each element until hitting the desired value.

You might also like