CodePudding user response:
One is m + n, one is m or n, of courseCodePudding user response:
A m + n, one is the Max (m, n), m, n the larger value,For example, m=8, n=6; So a complexity is 14, the second complexity is 8, obviously
CodePudding user response:
Want to see the relationship between the m and n, if is linear or m is constant, can be thought of as equivalent, O (a * n + b), if a, b is constant, the complexity is O (n) and so O (n) algorithm is not necessarily better than O (n ^ 2) algorithm, to look at the size of nCodePudding user response:
In fact the two are the complexity of the O (n) level,CodePudding user response:
At least king says, the bookCodePudding user response:
O (N) represents the time complexity is linear growth, which is the input data size and time consuming is a linear relationship betweenO (Max (m, n)) and O (m + n) actually like