if an algorithm takes a total time of T(log n + n^2), is this big O(log n + n^2) or simply big O(n^2) ?
unclepauly
6
Light Poster
Recommended Answers
Jump to PostBig O takes the biggest part of the time expression because it has the biggest effect. :) As n gets bigger and bigger, the log n part will get less and less significant as the n^2 part starts to dominate. Since you can toss anything smaller than n^2 in the …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.