0
讓我們假設我有以下幾點:可以添加兩個代碼片段的時間複雜度?
1- a code snippet "CODE1" with time complexity O(N^2)
2- a code snippet "CODE2" with time complexity O(L*N)
,如果我在一個Java程序中集成兩個片段,如:
public class Main {
CODE1;
CODE2;
}
我可以說,這個方案的複雜度爲O(N^2 + L * N)?