I have a program that I need an efficient algorithm for and I was hoping someone could lend some insight. This program will eventually be written in Java for my Advanced Data Structures class, so I'm more concerned with an efficient algorithm as opposed to actual working code at this point.

Here is what the program must do efficiently. Read in a SUPER HUGE file of positive numbers, then determine:

a) The maximum value of a[j] + a[i], for j >= i

b) The maximum value of a[j] - a[i], for j >= i

c) The maximum value of a[j] * a[i], for j >= i

d) The maximum value of a[j] / a[i], for j >= i

The key here is to have something efficient because the files the grader will be using are huge. Thanx in advance.