title: How to calculate the complexity of a "not so simple" program?
body: <p>I know how to calculate the complexity of a program whenever there is a variable declaration or some simple loops are involved (i.e a linear case ) by counting the number of times each line will be executed. </p>
  
  <p>But in some cases I see that some lines of code run logarithmically,exponentially,in a cubic order,etc, I just want to know how can I figure that out?</p>