Question: Suppose that this pseudocode is modified to eliminate the need for a special value. The following represents the modified pseudocode (note: only lines 1-2 were

Suppose that this pseudocode is modified to eliminate the need for a special value. The following represents the modified pseudocode (note: only lines 1-2 were modified). Fill in the blank in line 3 (indicated by question marks) in a way that is consistent with the modifications: Find-Max-Crossing-Subarray (A, low, mid, high)

1. max-left = mid

2. left-sum = sum = A [max-left]

3. for i = ???? downto low

4. sum = sum + A [i]

5. if sum > left-sum

6. left-sum = sum

7. max-left = i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!