I've not been able to get my dad to understand why you should switch with 1,000,000 boxes because he refuses to believe the 3 box and 1,000,000 box case is the same. I can't even convince him a 3 and 5 box problem are the same.
I actually think I could convince him switching is correct using this strategy because I suspect if he thinks he's tricking or cheating at the game he'll be more open to the explanation.
Serial speed is always a gain up, no questions asked I guess.
Obviously all of that is over simplified, and not considering other components to any system that would be built (but hey, it's not like any of this is happening tomorrow anyway).
You count the number of "swap" operations in insertion sort, quicksort, or merge sort. You count the number of "memory" operations. You count the number of bytes used.
When precise counts are difficult, you learn big-O notation to estimate how counts change as variable grow. Etc. etc. etc.
But I have a question - why do they share this info? Is it to show they’re reliable or just for curiosity? Or some other reason?
I like bitcoin (the idea, not the burning of the planet, even though it's only a temporary hack to bootstrap the whole thing). And hey, maybe it will encourage building nuclear mining farms, that will give their owners free bitcoin, and then we can use the nuclear plants.
The only defense I can stomach for Bitcoin's unfathomable energy consumption is that it might be only temporary. Is it worth it? So far, not that much, but I think developed-countries under-estimate the value of bitcoin, since they have more stable economies, and thus currencies, and enjoy freedom of moving their money, and data privacy...
Find the empty string and replace with say
where refers to the captured variable, and with input the result is With an empty input, the result is The result of indexOf can consistently return the first index of the first half open subrange in a string. It just so happens that the first subrange of an empty string in an empty string is [0, 0).The limiting case is also an interesting way to look at it: