On 13/04/17 07:30, Peter Otten wrote:
Verdict: not greedy ;)
Great (as I mentioned I did look at the code VERY quickly whilst VERY tired and at first glance missed that it's doing almost exactly what my code is doing except using the heapq to manage tracking the smallest value rather than sorting or scanning a flat list all the time).
Thanks for the clear demonstration - it looks like that's exactly what I need then (as others have also pointed out, too).
E. -- https://mail.python.org/mailman/listinfo/python-list