Draw a bootstrap sample of indices: n indices chosen uniformly with replacement from 0,…,n−1, using np.random.default_rng(seed).integers(0, n, size=n).
Implement solve(n,seed=0).
Returns. Return an integer NumPy array of length n. Indices may repeat and some indices may be missing.
Example 1
Input:
solve(6, 0)
Output:
[5, 3, 3, 1, 1, 0]
Example 2
Input:
solve(5, 42)
Output:
[0, 3, 3, 2, 2]
No results yet
Run your code to check it against the examples, or submit to run every test.