I have a question regarding code for “6.14 creatin random subset”. Instead of code given in the book, can we use “6.11 Sample offline data” technique?
6.14 Compute a random subset, why cannot use Sample offline data
You can, but if you use the technique of 6.11, you need to explicitly create the array A, which will increase the space complexity to O(n).
1 Like