for the above 2 big O’s, what happens if n>>m . How does the big O change? Does it become O(n) in the first case. If yes ,why?
Share
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.
It depends on what you know about what the maximum value of
mcould be (depending onn).If both
mandnare independent variablesO(mn)isO(mn)and cannot be further simplified. If you know thatmwill never be greater thann, but nothing else, you can also write it asO(n^2). If you know for example thatmwill never be greater thanlog n(which would satisfyn >> m),O(mn)can be written asO(n log n).