Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //QUESTION 1
- // 4
- //QUESTION 2
- // 7, 10, 13
- //QUESTION 3
- // It needs to be sorted
- //QUESTION 4
- lb = mid + 1;
- ub = mid - 1;
- //QUESTION 5
- Double dw[] = new Doubles[dd.length];
- for (int i; i<dd.length; i++)
- dw[i] = dd[i];
- //QUESTION 6
- // No issues
- //QUESTION 7
- // O(log(n))
- //QUESTION 8
- // O(n)
- //QUESTION 9
- // It is possible depending on the index of the value
- //QUESTION 10
- // 1
- //QUESTION 11
- // n
- //QUESTION 12
- // binary
- //QUESTION 13
- // Linear because binary requires it to be sorted.
- //QUESTION 14
- if (Arrays.binarySearch(dd, 107.3) != -1)
- System.out.println("Hubba hubba");
- //QUESTION 15
- // 16 and 17
- //QUESTION 16
- // Yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement