Post Reply 
Exams done [Personal Post]
PERSONAL AS SHIT TALKING ABOUT MAHSELF YE
Author Message
Assassinator
...

Posts: 6,646.6190
Threads: 176
Joined: 24th Apr 2007
Reputation: 8.53695
E-Pigs: 140.8363
Offline
Post: #18
RE: Exams done [Personal Post]
(21/04/2012 05:52 PM)ProperBritish Wrote:  big O is just how many operations an algorithm does compared to the size of the data set.
bubble sort for example is O(n^2), i.e. for a data set of 40 it'll do ~160 operations.

I was reading shit randomly, and noticed that this is pretty much totally wrong.

O(n^2) means that increasing the data set by n times increases calculation time by n^2 times.  So if a data set of size X takes Y time, a dataset of n*X takes (n^2)*Y time.

Note that the big O notation only cares about the most significant term, so something like 3n^2+5n+8 will simply be O(n^2), not O(3n^2+5n+8) because that's a giant mess and because lower order terms doesn't matter that much when shit gets large.
31/07/2012 05:43 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
Exams done [Personal Post] - Tetris999 - 21/04/2012, 05:23 PM
RE: Exams done [Personal Post] - weterr123 - 21/04/2012, 05:28 PM
RE: Exams done [Personal Post] - Tetris999 - 21/04/2012, 05:51 PM
RE: Exams done [Personal Post] - Tetris999 - 21/04/2012, 06:02 PM
RE: Exams done [Personal Post] - Assassinator - 31/07/2012 05:43 AM
RE: Exams done [Personal Post] - Kuu - 21/04/2012, 06:46 PM
RE: Exams done [Personal Post] - Tetris999 - 22/04/2012, 08:13 AM
RE: Exams done [Personal Post] - Cirehpsa - 21/04/2012, 10:21 PM
RE: Exams done [Personal Post] - Tetris999 - 21/04/2012, 10:58 PM
RE: Exams done [Personal Post] - Cirehpsa - 21/04/2012, 11:12 PM
RE: Exams done [Personal Post] - Cirehpsa - 22/04/2012, 09:22 AM
RE: Exams done [Personal Post] - Tetris999 - 23/04/2012, 09:42 PM
RE: Exams done [Personal Post] - Tetris999 - 23/04/2012, 10:47 PM
RE: Exams done [Personal Post] - Tetris999 - 02/08/2012, 04:44 AM
RE: Exams done [Personal Post] - Tetris999 - 09/08/2012, 07:59 PM
RE: Exams done [Personal Post] - bazz - 09/08/2012, 03:13 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

 Quick Theme: