# [Leetcode 398] Random Pick Index

[Leetcode 398] Random Pick Index

### 题目要求

Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the array.

Note:

The array size can be very large. Solution that uses too much extra space will not pass the judge.

Example:

### 解题思路

Your runtime beats 99.75% of cpp submissions.