Complete the code to start the binary search with the correct initial middle index.
int mid = (low + [1]) / 2;
The middle index is calculated by adding low and high indices and dividing by 2.
Complete the code to update the low index when the target is greater than the middle element.
if (target > arr[mid]) { low = [1]; }
When target is greater than middle element, search continues in the right half, so low becomes mid + 1.
Fix the error in the loop condition to correctly continue binary search while low is less than or equal to high.
while (low [1] high) { int mid = (low + high) / 2; // search logic }
The loop should continue while low is less than or equal to high to include all elements.
Fill both blanks to complete the binary search update steps for when target is less than or greater than the middle element.
if (target < arr[mid]) { high = [1]; } else { low = [2]; }
If target is less than middle, high moves to mid - 1; else low moves to mid + 1.
Fill all three blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
Map<String, Integer> result = words.stream()
.filter(word -> word.length() [1] 3)
.collect(Collectors.toMap(
word -> word.[2](),
word -> word.[3]()
));Filter words with length greater than 3, map keys to uppercase words, values to their lengths.
