Calculation Big O Of An Algorithm