as far as I got it linear complexity can be represented as simple loop and quadratic complexity can be represented as nested loop. How can the cubic and logarithmic complexity be represented?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A simple loop can have logarithmic complexity, e.g.
As others have already answered, a triple nested loop will have cubic complexity.