Reccurence of recursive function with unequal sizes of subproblems
Your timing function is $T(n)=2T(n/3)+1$, namely two recursive calls to one-third size problems plus a constant amount of time for the if test and the assignments. If you know the Master Theorem, the answer is immediate, namely $T(n)=\Theta(n^{\log_32})$. If you don't know the MT, it's not too difficult to see the answer by expansion:

$$\begin{align}
T(n) &amp;= 2T\left(\frac{n}{3}\right)+1\\
 &amp;= 2\left(2T(\frac{n}{3^2})+1\right)+1=2^2\ T\left(\frac{n}{3^2}\right)+2+1\\
 &amp;=2^3\ T\left(\frac{n}{3^3}\right)+4+2+1 &amp;\text{and, in general, we have}\\
&amp;\dotsc\\
&amp;=2^k\ T\left(\frac{n}{3^k}\right)+\left(2^{k-1}+\dotsm +4+2+1\right)
\end{align}$$
Now let $n=3^k$ and the result follows with a little algebra.