@gurth Surely programmers think zero-based everywhere?
Posts made by PleegWat
RE: Dumb and Random Videos Thread
"Is this dangerous?"
Heavier than air ⇒ less likely to leave your lungs. Or so I've heard.
In theory, that's true, but in practice, a few deep breaths will clear it all out.
Naturally. After all, carbondioxide is heavier than oxygen.
RE: Finding max element of an array using two heap-allocated arrays and a bubble sort
if you don't mind iterating over the array twice
You can extract min and max in a single iteration with a dedicated function.
Iterating it twice is still O(n). ¯\_(ツ)_/¯
/"Big-O is the only performance metric that anyone should need"
And hash tables are pointless because they are only as efficient as the mechanism they use to resolve conflicts.