We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Big O notation dictates an upper bound not a case by case runtime. In addition Big O dictates that O(n) is equivalent to O(2n) and O(n + m) is equivalent to O(2n) where n = m. Therefore by the transitive property O(n + m) is equivalent to O(n). But it is really irrelevant, I get the point you are trying to make :)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Variable Sized Arrays
You are viewing a single comment's thread. Return to all comments →
Big O notation dictates an upper bound not a case by case runtime. In addition Big O dictates that O(n) is equivalent to O(2n) and O(n + m) is equivalent to O(2n) where n = m. Therefore by the transitive property O(n + m) is equivalent to O(n). But it is really irrelevant, I get the point you are trying to make :)