Hi, I was solving this problem a few minutes ago, and the following problem is a subproblem of this one.
Given integer $$$n$$$, and array $$$a$$$ consisting of $$$n - 1$$$ integers, all of them are equal to some value $$$b$$$. Later, some integer $$$c$$$ is chosen, such that $$$c != b$$$, and beign inserted to the array $$$a$$$ at random position. By given $$$n$$$ and $$$a$$$ find $$$c$$$.
my solution