Go heap solution
Cause all I do is dance.\n\ntype IntHeap []int\n\nfunc (h IntHeap) Len() int {return len(h)}\nfunc (h IntHeap) Less(i, j int) bool {return h[i] > h[j]}\nfunc (h
Cause all I do is dance.\n```\ntype IntHeap []int\n\nfunc (h IntHeap) Len() int {return len(h)}\nfunc (h IntHeap) Less(i, j int) bool {return h[i] > h[j]}\nfunc (h IntHeap) Swap(i, j int) {h[i], h[j] = h[j], h[i]}\nfunc (h *IntHeap) Push(x interface{}) {*h = append(*h, x.(int))}\nfunc (h *IntHeap) Pop() interface{} {\n    n := len(*h)\n    x := (*h)[n-1]\n    *h = (*h)[0:n-1]\n    return x\n}\n\nfunc lastStoneWeight(stones []int) int {\n    pq := IntHeap(stones)\n    heap.Init(&pq)\n    for pq.Len() > 1 {\n        x, y := heap.Pop(&pq).(int), heap.Pop(&pq).(int)\n        if x != y {\n            heap.Push(&pq, x-y)\n        }\n    }\n    \n    if pq.Len() == 0 {\n        return 0\n    }\n    \n    return heap.Pop(&pq).(int)\n}\n```
['Go']