Big O notation property Does the following correct and why?
$O(1)+O(\sqrt{n})=O(\sqrt{n})$,
where $O(.)$ means big O notation.
My thinking is that it is correct because
$\lim_{n \rightarrow\infty} \frac{1}{\sqrt{n}}=0 < \infty$. Thus  $1\leq \sqrt{n}$.

One should follow the formal definition of the big O notation.
Let $f,g:\mathbb{N}\to\mathbb{R}$ be two sequences such that for some constant $C,M>0$, for every $n>M$,
$$
|f(n)|\le C,\quad |g(n)|\le C\sqrt{n} 
$$
By the triangle inequality,
$$
|f(n)+g(n)|\leq C(1+\sqrt{n})\leq 2C\sqrt{n}
$$
So $f+g\in O(\sqrt{n})$.
On the other hand, if $f\in O(\sqrt{n})$, it is trivial to see that $f\in O(1)+O(\sqrt{n})$.
