Go golang solution
Runtime: 12 ms, faster than 89.66% of Go online submissions for Delete Nodes And Return Forest.\nMemory Usage: 6.4 MB, less than 99.14% of Go online submissions
>Runtime: 12 ms, faster than 89.66% of Go online submissions for Delete Nodes And Return Forest.\nMemory Usage: 6.4 MB, less than 99.14% of Go online submissions for Delete Nodes And Return Forest.\n\n```go\nfunc delNodes(root *TreeNode, to_delete []int) []*TreeNode {\n    m, ans := make(map[int]bool), []*TreeNode{}\n    for _, v := range to_delete { m[v] = true }\n    helper(root, &ans, true, m)\n    return ans\n}\n\nfunc helper(root *TreeNode, ans *[]*TreeNode, isRoot bool, m map[int]bool) *TreeNode {\n    if root == nil { return nil }\n    _, ok := m[root.Val]\n    if isRoot && !ok { *ans = append(*ans, root) }\n    root.Left = helper(root.Left, ans, ok, m)\n    root.Right = helper(root.Right, ans, ok, m)\n    if ok { return nil }\n    return root\n}\n```
[]