A slow function returns the largest j - i over all pairs i < j with A[i] != A[j]. Rewrite it to return the same results faster.
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related questions
Write a function to return all prime numbers up to a given number n.Related courses

Course
