Golang solution
Intuition\n\nConsider each event ordered by start time while keeping track of the largest already completed event in a copy of the events sorted by end time.\n\
# Intuition\n\nConsider each event ordered by start time while keeping track of the largest already completed event in a copy of the events sorted by end time.\n\n# Complexity\n- Time complexity: $$O(nlogn)$$ for sorting.\n\n- Space complexity: $$O(n)$$ for a copy of the events.\n\n# Code\n```\nfunc maxTwoEvents(es [][]int) int {\n    // sort events by start time\n\tsort.Slice(es, func(p, q int) bool { return es[p][0] < es[q][0] })\n\n    // copy of events sorted by end time\n\tee := append([][]int(nil), es...)\n\tsort.Slice(ee, func(p, q int) bool { return ee[p][1] < ee[q][1] })\n\n    // resulting maximum value\n\tr := 0\n    // index into ee for the events that have been completed\n\tj := -1\n    // the maximum value of events that have been completed\n\tmcv := 0\n\n    // consider each event\n\tfor _, e := range es {\n\n        // update index and maximum value of completed events\n\t\tfor ee[j+1][1] < e[0] {\n\t\t\tj++\n\t\t\tif ee[j][2] > mcv {\n\t\t\t\tmcv = ee[j][2]\n\t\t\t}\n\t\t}\n\n        // value of the current event + the maximum completed event\n\t\tv := e[2] + mcv\n\n\t\tif v > r {\n\t\t\tr = v\n\t\t}\n\t}\n\n\treturn r\n}\n```
['Go']