Horje
missing integer c# Code Example
missing integer c#
public int solution(int[] A)
    {
        var val = new HashSet<int>(A).Where(x => x >= 1).OrderBy((y) =>y).ToArray();
        var minval = 1;
        for (int i = 0; i < val.Length; i++)
        {
            if (minval < val[i])
            {
                return minval;
            }
            minval = val[i] + 1;
        }

        return minval;
    }




Csharp

Related
c# list.except compare classes with IEqualityComparer Code Example c# list.except compare classes with IEqualityComparer Code Example
OpenBots convert Int Code Example OpenBots convert Int Code Example
remove all values from list c# Code Example remove all values from list c# Code Example
unity collapse hierarchy script Code Example unity collapse hierarchy script Code Example
asp.net disabled checkbox style Code Example asp.net disabled checkbox style Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13