Given
• a matrix variable “matrixA” of type double and size N-by-M (N
rows and M columns)
• a vector variable “vectorB” of type double and size M-by-1
Assume the variables vectorB, vectorC and matrixA have been declared
#define SIZE_N 20
#define SIZE_M 10
:
double matrixA[SI...
Data Structure and
Algorithms
(Revisit the big “O”)
UKZN
ENEL2DSH2
2016
,Recall!
Big Oh notation
f(n) = O( g(n) ) : “f of n is big oh of g of n” if and only if there exists
positive constants c and m such that f(n) <= c x g(n) for all n >= m
Example:
Function 3n + 2 = O(n)
Reason
3n + 2 <= 4n for all n >= 2
, Complexity of algorithm
• Note that advanced studies on big “O” and other related topics on
complexity will be covered again in 4th year
Recommended: Take module ENEL4AA H1
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying this summary from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller mthimkhuluramasimong. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy this summary for R162,00. You're not tied to anything after your purchase.