Given a sequence A of up to 100,000 numbers, find a pair of positions i and j with |i - j| > 1 that minimises A[i] + A[j].
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related questions
Given a string with parentheses, write a function that removes the minimum number of characters to balance the parentheses.Given a set of numbers, find the number in the set that is closest to the mean of the entire set.Given a list of words, find the number of prefix pairs, i.e. pairs i, j where words[i] == words[j] or words[i].startswith(words[j]) or words[j].startswith(words[i]).Related courses

Course
