7 ms·
the ^2's are https://en.m.wikipedia.org/wiki/Big_O_notation https://en.m.wikipedia.org/wiki/Big_O_notation The tldr is bigO gives you how the cost of apples c
by DarkmSparks 2y ago
the ^2's are
https://en.m.wikipedia.org/wiki/Big_O_notation https://en.m.wikipedia.org/wiki/Big_O_notation
The tldr is bigO gives you how the cost of apples changes with the number of apples in the worst case.
its a rough simplification, the precise formula is close but not exactly that. the simplification is also actually (2n)^2 but in my defense I was going from memory of work from more than 2 decades ago (testing generated prime factors were good prime factors, overwhelmingly they were not).
using your apples example
if the bigO of eating apples is O(n^2), and it takes you 8 minutes to eat 2 apples, it will take you no more than 64 minutes to eat 4 apples.