Hungarian method implementation and unit tests