I've been searching for a while on how to calculate complexity of algorithms.. and while there are some great explanations, I just don't seem to understand exactly how it works.. so I thought maybe on this example, someone can clarify it for me
void test(int n){
for ( int i = 1; i <= n; i++, n=n/2)
for(int j = 1; j <= n; j++)
..O(1)..
}