Time complexity (O notation)

If I have 3 parts of the code each part takes

1) O(n)
2) O(m)
3) O(k)

n, m, k can be the same length at some point but most of the time they are different length. Does that mean time complexity of my program is:

O(n*m*k) or O(n^3) ?
Big tells you what the worst case is, so I would say it is a O(n^3).. Not a expert
It depends on how those 3 parts relate to each other. If they execute independent of each other, then the big O of your program is O(largest of m, n, k). You haven't provided any code and have not explained what your 3 parts are doing, so there is no way of giving a concrete answer
Topic archived. No new replies allowed.