First Missing Positive Solutions in GoNumber 41Difficulty HardAcceptance 32.1%Link LeetCodeOther languages C++, PythonSolutionsGo solution by halfrost/LeetCode-Gopackage leetcode func firstMissingPositive(nums []int) int { numMap := make(map[int]int, len(nums)) for _, v := range nums { numMap[v] = v } for index := 1; index < len(nums)+1; index++ { if _, ok := numMap[index]; !ok { return index } } return len(nums) + 1}package leetcode func firstMissingPositive(nums []int) int { numMap := make(map[int]int, len(nums)) for _, v := range nums { numMap[v] = v } for index := 1; index < len(nums)+1; index++ { if _, ok := numMap[index]; !ok { return index } } return len(nums) + 1 }