Golang 8ms 100% Solution
go\ntype ExamRoom struct {\n\tseat    int\n\tstudent []int\n}\n\nfunc Constructor(N int) ExamRoom {\n\treturn ExamRoom{\n\t\tseat:    N,\n\t\tstudent: []int{},\
```go\ntype ExamRoom struct {\n\tseat    int\n\tstudent []int\n}\n\nfunc Constructor(N int) ExamRoom {\n\treturn ExamRoom{\n\t\tseat:    N,\n\t\tstudent: []int{},\n\t}\n}\n\nfunc (er *ExamRoom) Seat() int {\n\tif len(er.student) == 0 {\n\t\ter.student = append(er.student, 0)\n\t\treturn 0\n\t}\n\tseat, distance, index := 0, er.student[0], 0\n\tfor i := 0; i < len(er.student)-1; i++ {\n\t\tcurrentDistance := (er.student[i+1] - er.student[i]) / 2\n\t\tif currentDistance > distance {\n\t\t\tdistance = currentDistance\n\t\t\tseat = er.student[i] + distance\n\t\t\tindex = i + 1\n\t\t}\n\t}\n    if er.seat - 1 - er.student[len(er.student)-1] > distance {\n\t\tdistance = er.seat - 1 - er.student[len(er.student)-1]\n\t\tseat = er.seat - 1\n\t\tindex = len(er.student)\n\t}\n\ter.student = append(er.student, 0)\n\tcopy(er.student[index+1:], er.student[index:])\n\ter.student[index] = seat\n\treturn seat\n}\n\nfunc (er *ExamRoom) Leave(p int) {\n\tl, r := 0, len(er.student)-1\n\tfor l <= r {\n\t\tm := (l+r)>>1\n\t\tif er.student[m] == p {\n            // remove student[m]\n\t\t\ter.student = append(er.student[:m], er.student[m+1:]...)\n\t\t\treturn\n\t\t}\n\t\tif er.student[m] > p {\n\t\t\tr = m-1\n\t\t} else {\n\t\t\tl = m+1\n\t\t}\n\t}\n\treturn\n}\n```
['Go']