Problem : "Suppose you are given as input a sequence of numbers [a1, a2, . . . , an] with n ? 2. Your goal is to find the largest ratio between two of these numbers where the numerator occurs after the denominator in the sequence."
Obviously, one can just sort the list and find the largest ratio, but given the problem constraint about the numerator and denominator that option is out. What can we do ?