Tue Jul 27 2021 15:24:25 GMT+0000 (Coordinated Universal Time)
Saved by @nhatphan108
#Order does matter func remove(slice []int, s int) []int { return append(slice[:s], slice[s+1:]...) #Order does not matter func remove(s []int, i int) []int { s[i] = s[len(s)-1] return s[:len(s)-1] }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments