Question:
MEX Problem
Given an array arr contalning n non-negative integers and an element x, in one operation, x can be added to or subtracted from any element of the array. MEX of an array is defined as the smallest non-negative integer which is not present in the array. For example, the MEX of [0, 1, 1, 3] is 2, and the MEX of [1, 2, 4] is 0.
Find the maximum possible MEX of the array that can be achieved by doing the above operation any number of times.
![image](https://assets.leetcode.com/users/images/dceaa92f-bd67-4b87-91d9-009ee81070de_1658589541.4295812.png)
![image](https://assets.leetcode.com/users/images/38929ab4-3c5c-4480-b575-1a9e9003682e_1658589545.9129329.png)