I am trying to solve the following recurrence relation :-
$T(n) = T(\sqrt{n}) + n$ using masters theorem.
We can substitute $n = 2 ^ m$
$T(2^m) = T(2 ^ {\frac{m}{2}}) + 2^m$
Now we can rewrite it as
$S(m) = S(\frac{m}{2}) + m$
The big $O$-notation for $S(m)$ will be $O(m)$.
Hence, $T(n) = T(2^m) = S(m) = O(m)$.
So we can say that $T(n) =O(\log n)$ as $n=2^m$.
But the answer is $O(\log\log n)$ . What is wrong with my approach ?