Bug fix: greedy.cpp
Couple of small bug fixes in BPSorter/estimateByBlock