Swift 3 - 100%
public func solution(_ A : inout [Int]) -> Int {
// write your code in Swift 3.0 (Linux)
var solution = 1
var hashSet = Set()
    for int in A
    {
        if int > 0
        {
            hashSet.insert(int)
            while hashSet.contains(solution)
            {
                solution += 1
            }
        }
    }
    return solution
}
Thanks to Marian's answer above.