Skip to content

Instantly share code, notes, and snippets.

@asm-jaime
Created June 13, 2016 07:10
Show Gist options
  • Save asm-jaime/1e79abc8e5ba1cb446de916ca9b8e5d7 to your computer and use it in GitHub Desktop.
Save asm-jaime/1e79abc8e5ba1cb446de916ca9b8e5d7 to your computer and use it in GitHub Desktop.
import (
"sort"
)
type Int64Slice []int64
func (slice Int64Slice) Len() int { return len(slice) }
func (slice Int64Slice) Less(i, j int) bool { return slice[i] < slice[j] }
func (slice Int64Slice) Swap(i, j int) { slice[i], slice[j] = slice[j], slice[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment