deleted by creator
deleted by creator
I think this is called aposiopesis
Yeah, that’s confusing to read. A hashset can only contain at most one of each cheese kind, in c++20 you can write inventory.contains(cheeseName)
, before that you had to use .count
or inventory.find(cheeseName) != inventory.end()
or something like that
Exactly, raw pointers are very rarely the way to go
Well landau notation only describes the behaviour as an input value tends to infinty, so yes, every real machine with constant finite memory will complete everything in constant time or loop forever, as it can only be in a finite amount of states.
Luckily, even if our computation models (RAM/TM/…) assume infinite memory, for most algorithms the asymptotic behaviour is describing small-case behaviour quite well.
But not always, e.g. InsertionSort is an O(n^2) algorithm, but IRL much faster than O(n log n) QuickSort/MergeSort, for n up to 7 or so. This is why in actual programs hybrid algorithms are used.
As the volume of the room is finite, even “exponential” or worse search algorithms will complete in constant time.
I love how the text seems to be right from the time where the symbol was already abstract, but it was still used as an et ligature instead of a standalone symbol