Find the MEX of given Array
Mex of an array is the smallest non-negative integer that does not appear in the array. Given an array of non-negative integers, find mex of its elements. Examples : Input : arr[] = {0, 3, 1, 2} Output : 4 All integers smaller than 4, i.e. 0, 1, 2 and 3 are present in the array. Hence mex… Read More »