LeetCode Question · Dec 2019 · Los Angeles

Facebook | Onsite | Generate random max index

41 upvotes 11,882 views 13 replies

Question Details

Given an array of integers arr, randomly return an index of the maximum value seen by far. Example: Input: [11, 30, 2, 30, 30, 30, 6, 2, 62, 62] Having iterated up to...

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Arrays