Toot

Written by Jez 🍞🌹 on 2024-09-13 at 07:59

@pglpm So now I'm interested to know if that's right or not 😂

I learnt this algorithm as a way of picking a random line from a large file, with an equal chance of picking any line, only storing one line at any one time and passing through the file only once: store the first line, then reading line by line replace the stored line with line n with probability 1/n.

=> More informations about this toot | View the thread | More toots from petrichor@digipres.club

Mentions

=> View pglpm@c.im profile

Tags

Proxy Information
Original URL
gemini://mastogem.picasoft.net/toot/113129185490355311
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
225.66322 milliseconds
Gemini-to-HTML Time
0.449331 milliseconds

This content has been proxied by September (3851b).