Visit Jeremy's Blog.
 Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org how to find the time complexity ?
 Linux - Newbie This Linux forum is for members that are new to Linux. Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

 12-07-2012, 11:43 AM #1 rpittala Member   Registered: Jan 2012 Location: PUNE Distribution: SunOS sun4v sparc sun4v Solaris Posts: 82 Blog Entries: 1 Rep: how to find the time complexity ? Hi , how to find the time complexity of an algorithem and when to consider the O(n) O(n2).... and O(logn) O(n log n)... Please provide some need full docs or links (url) to understand. FYI, I have googled for it found some information. But, not able to figure it out. Thanks & Regards, rpittala.
 12-07-2012, 12:03 PM #2 markush Senior Member   Registered: Apr 2007 Location: Germany Distribution: Slackware Posts: 3,979 Rep: Here is an article in wikipedia http://en.wikipedia.org/wiki/Time_complexity I would recommend that you try to understand the subject and then when you have further questions, use the Report-button at your posting and ask a Moderator to move this thread to the "Programming" forum. Markus
12-07-2012, 12:29 PM   #3
linosaurusroot
Member

Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep:
Quote:
 Originally Posted by rpittala time complexity of an algorithem and when to consider the O(n) O(n2).... and O(logn) O(n log n)...

MIT Opencourseware includes the 600 course that I can recommend.
http://ocw.mit.edu/courses/electrica...ideo-lectures/

 12-07-2012, 08:42 PM #4 Adickel LQ Newbie   Registered: Jul 2009 Posts: 14 Rep: Its not always simple To find the complexity of an algorithm can't be done with simple commands or testing the algorithm without understanding the test case and how the algorithm operates. If you were to submit a case of n objects to the algorithm it processes them in "n" time. If you increase this by 2 then it processes in 2N time. The only true way to figure out the complexity is to look at the code. Loops where every "object" that the algorithm is processed is an O(n). You can look for nested loops, if for every object, all n objects are processed, you have an O(n^2). Its very complex and hard to explain, you might want to read the Wikipedia article in full.

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post robertjinx Linux - Server 2 05-12-2010 02:58 PM vxc69 Programming 1 02-18-2008 01:05 PM pasupuleti Linux - Security 18 09-24-2006 01:07 PM moinpasha Linux - Security 11 09-13-2006 10:53 PM moinpasha Programming 1 09-12-2006 05:24 AM

LinuxQuestions.org

All times are GMT -5. The time now is 12:35 PM.

 Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -