[ prog / sol / mona ]

prog


Go(lang) Thread

16 2020-01-22 22:51

Yeah, that's wierd but the trick is to re-use append when removing like this:

a = append(a[:index], a[:index+1]...)

as described here: https://github.com/golang/go/wiki/SliceTricks.

25


VIP:

do not edit these