for(int i=N; i>0; i=i/2)
irrelevant statement;
I am asked to find the complexity class and I am unsure of whether I am supposed to use Big-Omega notation or Big-O? But I am assuming that it is O(N/2) and then O(N) if I drop the constants.
for (int i=0; i<N; i++)
for (int j = i+1; j<N; j++)
irrelevant statement;
For this one I believe it is O(N) * O(N+1) -> O(N^2 + N) and then O(N^2) after I drop the N?