3 ms·
Pretty big. You're comparing quicksort at O(n log n) to hand at O(n). A computer is about a billion times faster per operation, so log n = 1 billion, or n = 2^b
by tlb 7y ago
Pretty big. You're comparing quicksort at O(n log n) to hand at O(n). A computer is about a billion times faster per operation, so log n = 1 billion, or n = 2^billion.
- mirekrusin 7y agoHey, but you don't need to do it by hand, you can simulate physics of spaghetti, right? :)
- s_gourichon 7y agoReminds me how you can compute pi in a hilariously inefficient yet very interesting way with a physics engine by counting collision of 3 blocks bouncing with one another: https://youtu.be/HEfHFsfGXjs https://youtu.be/HEfHFsfGXjs