Alexander Obregon·Apr 10Reservoir Sampling in JavaSampling from a stream gets tricky when items arrive one at a time, the total length is unknown, and storing every item in memory is not…
Roya·Apr 2, 2025Linked List Random NodeThis blog series attempts to solve the 500 Top Leet Code Interview Questions with the help of AI Code Assistance, such as Gemini and GPT.
John Lu·Jul 16, 2024LeetCode 382. Linked List Random NodeLeetCode Notes [75]: Brief explanation for Reservoir Sampling
yoshie·Oct 8, 2021Leetcode — reservoir samplingThis is a very small topic in all bunch of Leetcode problems, and I found that even for some problems that are labeled with reservoir…