Optimize the sort algorithm in drop-off

Using bucket sorting instead of std::sort