calculates big o notation