big O notation algorithm
Posted
by niggersak
on Stack Overflow
See other posts from Stack Overflow
or by niggersak
Published on 2010-04-27T15:25:33Z
Indexed on
2010/04/27
15:33 UTC
Read the original article
Hit count: 367
- Use big-O notation to classify the traditional grade school algorithms for addition and multiplication. That is, if asked to add two numbers each having N digits, how many individual additions must be performed? If asked to multiply two N-digit numbers, how many individual multiplications are required?
. Suppose f is a function that returns the result of reversing the string of symbols given as its input, and g is a function that returns the concatenation of the two strings given as its input. If x is the string hrwa, what is returned by g(f(x),x)? Explain your answer - don't just provide the result!
© Stack Overflow or respective owner