Q.
Let $f(x)=\left\{\begin{array}{cc}x+a, & \text { if } x<0 \\ |x-1|, \text { if } x \geq 0\end{array}\right.$ and
$g(x)=\left\{\begin{array}{cc}x+1, & \text { if } x<0 \\ (x-1)^{2}+b, & \text { if } x \geq 0\end{array}\right.$
where $a$ and $b$ are non-negative real numbers. If the composite function $g o f \left(\right. x \left.\right)$ is continuous for all real $x,$ then the values of $a+b$ is _____.
NTA AbhyasNTA Abhyas 2022
Solution: