** Please help me out, I\'m trying to study for my final and this question is a
ID: 3660688 • Letter: #
Question
** Please help me out, I'm trying to study for my final and this question is a practice example to prepare myself for the final **
Consider the static Java method. yuhu, below, which has the precondition given in a comment before its header. PRE: the values in arr are in increasing order and are unique public static int yuhu (int arr, int x) int low 0; int high arr length 1; while (low high) int mid (low high) 2; if arr [mid]) return mid; else if (x arr [mid] high mid 1; else low mid 1; end while return -1; Part A. rite a method comment for yuhu in the space below; 1.e., one suitable for a caller of the method. Reminder: a method comment describes what a method does, not how it does it, and it should include a description of how the return value relates to the parameters given. You do not have to restate the precondition in your answer.) No credit will be given for a line-by-line description of the code Part B. What is the big-O worst-case time of the method?Explanation / Answer
it print 1->2->3->1->2->3->1->2->3-> and so on. its a circular Link list
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.