DIY: Random Pick Index
Explore how to solve the random pick index problem by implementing an efficient method that selects a random index of a target number in an array with duplicates. Understand memory optimization and algorithmic techniques used in Amazon coding challenges, preparing you for similar interview problems.
We'll cover the following...
We'll cover the following...
Problem statement
In this challenge, you are given an array of integers with possible duplicate values. Your task is to output a randomly picked index of a given target number present in the array. The solution ...