← Morgan Stanley questions
CodingReported in a candidate post, Aug 2020

Find pair indices with highest randomnessFactor

Filed under Morgan Stanley

Given an array, find the pair of indices (i, j) such that i < j and the randomnessFactor (arr[j] - arr[i]) is maximized, where arr[i] < arr[j].

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Morgan Stanley questions

Collected from public candidate posts and coding forums. Updated Nov 2026.