Trace through the binary search algorithm in findInSortedList given the following input.
What will be an ideal response?
```
findInSortedList("1",["3","5","7","9","10"])
Loop 1.
start = 0
end = 4
checkpoint = 2
alist[checkpoint] =“7”
Action: end is set to one less than checkpoint (1).
Loop 2.
start = 0
end = 1
checkpoint = 0
alist[checkpoint] =“3”
Action end is set to one less than checkpoint (0).
Returns: “Not found”
```
You might also like to view...
The URLs for all Web Pages must start with the http scheme.
Answer the following statement true (T) or false (F)
What is the length of time an IP address is assigned to a switch port called?
a. Delay time b. Enable time c. Aging time d. Access time
Answer the following statements true (T) or false (F)
1. Windows XP is a sequential multitasking operating system. 2. Windows XP recognizes 4 different priority levels numbered 0 through 3. 3. Windows XP uses a virtual memory manager (VMM) to allocate and manage system memory. 4. A valid page resides in physical memory. An invalid page does not reside in physical memory because it has either been swapped out to disk or has not yet been loaded into memory. 5. When a Windows XP process or thread references the contents of a virtual address on an invalid page, a page fault occurs.
Which of the following statements is correct?
a. Generics can help detect type errors at compile time, thus make programs more robust. b. Generics can make programs easy to read. c. Generics can avoid cumbersome castings. d. Generics can make programs run faster.