Wrote a more efficient version of maxdelta with no prioriQ.