Why after writeln the binaryHeap become empty?

lili akozhao at tencent.com
Tue Jun 18 15:45:33 UTC 2019


Hi Guys:
    see this code
~~~
     int[] ar = [1,2,3,4,52,34,22];
     auto h = heapify(ar);
     assert(h.length() == ar.length);
     writeln("h:",h);
     assert(h.empty());
~~~
dmd v2.086.0  run all assert passed. Why?


More information about the Digitalmars-d-learn mailing list