fork download
  1. import std.stdio, std.container;
  2.  
  3. void main() {
  4. auto q = heapify(Array!int([44, 22, 100, -1, 0, 5, 6, 7]));
  5. while (!q.empty) {
  6. write(q.front, " ");
  7. q.removeFront;
  8. }
  9. }
Success #stdin #stdout 0s 2708KB
stdin
Standard input is empty
stdout
100 44 22 7 6 5 0 -1