Find the first missing number in a sequence of numbers
问题 It's the second day I try to find a solution for this problem. I have an array. $datas; $datas[0]; // 8000 $datas[1]; // 8001 $datas[2]; // 8003 $datas[3]; // 8004 I have to find the first missing number starting from 8000 in this case it's 8002. My idea is to do somethig like this: $datas[0] +1 = $datas[1] if it's true port it's not free and I have to check the next one, if it's false it's the first free number. I know it's not a correct syntax but I have some problems writing it in the