HN user

dhathorn

75 karma

dmhathorn@gmail.com

Posts10
Comments9
View on HN
[dead] 14 years ago

Yes, but the original article is spreading misinformation. Anesthesia is always used during organ harvests.

Cocktail sort

  twoWayBubbleSort = ->
    VA.locals.swapped = true
    while VA.locals.swapped
      VA.locals.swapped = false
      for x in [0...VA.length - 1]
        VA.locals.x = x
        if VA.gt(x, x + 1)
          VA.swap(x, x + 1)
          VA.locals.swapped = true
      for x in[(VA.length-1)..1]
        VA.locals.x = x
        if VA.gt(x - 1, x)
          VA.swap(x - 1, x)
          VA.locals.swapped = true


  twoWayBubbleSort()