Choose signs such that $\pm\sqrt{1}\pm\sqrt{2}\pm\dots\pm\sqrt{2022}$ is as close as possible to $0$.
I tried looking at examples for small $n$ (up to $8$) for inspiration:
$$\begin{align} &1: -\sqrt{1} = -1 &(0, 0) \\ &2: +\sqrt{1}-\sqrt{2} = -0.414214 &(10, 2) \\ &3: +\sqrt{1}+\sqrt{2}-\sqrt{3} = 0.682163 &(110, 6) \\ &4: -\sqrt{1}+\sqrt{2}+\sqrt{3}-\sqrt{4} = 0.146264 &(0110, 6) \\ &5: +\sqrt{1}+\sqrt{2}+\sqrt{3}-\sqrt{4}-\sqrt{5} = -0.0898034 &(11100, 28) \\ &6: -\sqrt{1}+\sqrt{2}+\sqrt{3}-\sqrt{4}+\sqrt{5}-\sqrt{6} = -0.0671574 &(011010, 26) \\ &7: -\sqrt{1}-\sqrt{2}-\sqrt{3}+\sqrt{4}+\sqrt{5}+\sqrt{6}-\sqrt{7} = -0.106458 &(0001110, 14) \\ &8: -\sqrt{1}+\sqrt{2}-\sqrt{3}+\sqrt{4}+\sqrt{5}+\sqrt{6}-\sqrt{7}-\sqrt{8} = -0.106458 &(01011100, 92) \end{align}$$
The right side $(x, y)$ is interpreted as $$ \begin{align} x &= \text{binary for + and - where + is 1 and - is 0} \\ y &= x \text{ to base 10} \\ \end{align} $$
Doing this, I had hoped for a pattern that emerges from say powers of two but nothing seems useful here.
By flipping each sign of a correct solution, we can trivially get another solution for each $n$. If it was integers, we could use the parity argument but I don't see a way forward for square roots.
This question was given in an interview for a trading firm. The interviewer wanted to hear how I would approach and analyze this problem under time-constrained circumstances. I asked this question in math.stackexchange because the structure of this question reminds me of typical Olympiad question where there's a "trick" to solving it.
You can solve the problem via integer linear programming as follows. For $j\in\{1,\dots,2022\}$, let binary decision variable $x_j$ indicate whether $\sqrt{j}$ appears with positive sign. The problem is to minimize $$ \left|\sum_j \sqrt{j} x_j - \sum_j \sqrt{j} (1-x_j)\right| =\left|\sum_j \sqrt{j} (2x_j-1)\right|, $$ which can be linearized by introducing a variable $z$ and minimizing $z$ subject to \begin{align} z &\ge \sum_j \sqrt{j} (2x_j-1) \\ z &\ge -\sum_j \sqrt{j} (2x_j-1) \\ \end{align}
The resulting optimal objective value turns out to be no more than 5.893526E-10: